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.
5 #ifndef CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/public/common/storage_quota_params.h"
11 #include "webkit/common/quota/quota_types.h"
17 class QuotaPermissionContext
18 : public base::RefCountedThreadSafe
<QuotaPermissionContext
> {
20 enum QuotaPermissionResponse
{
21 QUOTA_PERMISSION_RESPONSE_UNKNOWN
,
22 QUOTA_PERMISSION_RESPONSE_ALLOW
,
23 QUOTA_PERMISSION_RESPONSE_DISALLOW
,
24 QUOTA_PERMISSION_RESPONSE_CANCELLED
,
27 typedef base::Callback
<void(QuotaPermissionResponse
)> PermissionCallback
;
29 virtual void RequestQuotaPermission(
30 const StorageQuotaParams
& params
,
31 int render_process_id
,
32 const PermissionCallback
& callback
) = 0;
35 friend class base::RefCountedThreadSafe
<QuotaPermissionContext
>;
36 virtual ~QuotaPermissionContext() {}
39 } // namespace content
41 #endif // CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_