1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_ 7 8 #include "base/callback.h" 9 #include "base/memory/ref_counted.h" 10 #include "content/public/common/storage_quota_params.h" 11 #include "storage/common/quota/quota_types.h" 12 13 class GURL; 14 15 namespace content { 16 17 class QuotaPermissionContext 18 : public base::RefCountedThreadSafe<QuotaPermissionContext> { 19 public: 20 enum QuotaPermissionResponse { 21 QUOTA_PERMISSION_RESPONSE_UNKNOWN, 22 QUOTA_PERMISSION_RESPONSE_ALLOW, 23 QUOTA_PERMISSION_RESPONSE_DISALLOW, 24 QUOTA_PERMISSION_RESPONSE_CANCELLED, 25 }; 26 27 typedef base::Callback<void(QuotaPermissionResponse)> PermissionCallback; 28 29 virtual void RequestQuotaPermission( 30 const StorageQuotaParams& params, 31 int render_process_id, 32 const PermissionCallback& callback) = 0; 33 34 protected: 35 friend class base::RefCountedThreadSafe<QuotaPermissionContext>; 36 virtual ~QuotaPermissionContext() {} 37 }; 38 39 } // namespace content 40 41 #endif // CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_ 42