Popular sites on the NTP: Try to keep the ordering constant
[chromium-blink-merge.git] / content / public / browser / quota_permission_context.h
blobe8d648983de9e4ead0236dd5f68752bd18e228dc
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 "storage/common/quota/quota_types.h"
13 class GURL;
15 namespace content {
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,
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;
34 protected:
35 friend class base::RefCountedThreadSafe<QuotaPermissionContext>;
36 virtual ~QuotaPermissionContext() {}
39 } // namespace content
41 #endif // CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_