summaryrefslogtreecommitdiffstats
path: root/content/public
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-02 19:37:00 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-02 19:37:00 +0000
commit9f9749a4eafd3f250b31551cdd453465dbf35534 (patch)
tree2c3944a9c09cc373b80565fc9240411961a68b59 /content/public
parent53e4d8f60c6a7c9710bc17aff140d8d8e0d3a1d8 (diff)
downloadchromium_src-9f9749a4eafd3f250b31551cdd453465dbf35534.zip
chromium_src-9f9749a4eafd3f250b31551cdd453465dbf35534.tar.gz
chromium_src-9f9749a4eafd3f250b31551cdd453465dbf35534.tar.bz2
Move QuotaPermissionContext to content/public/browser and put it in the content namespace.
BUG=98716 R=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/9566035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124710 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public')
-rw-r--r--content/public/browser/content_browser_client.h23
-rw-r--r--content/public/browser/quota_permission_context.h44
2 files changed, 54 insertions, 13 deletions
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 1ee4278..fb34d57 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -21,24 +21,11 @@ class CommandLine;
class FilePath;
class GURL;
class PluginProcessHost;
-class QuotaPermissionContext;
class RenderViewHost;
class ResourceDispatcherHost;
class SkBitmap;
struct WebPreferences;
-namespace content {
-class AccessTokenStore;
-class BrowserMainParts;
-class RenderProcessHost;
-class SiteInstance;
-class SpeechInputManagerDelegate;
-class WebContents;
-class WebContentsView;
-struct MainFunctionParams;
-struct ShowDesktopNotificationHostMsgParams;
-}
-
namespace crypto {
class CryptoModuleBlockingPasswordDelegate;
}
@@ -61,9 +48,19 @@ class Clipboard;
namespace content {
+class AccessTokenStore;
class BrowserContext;
+class BrowserMainParts;
+class RenderProcessHost;
+class QuotaPermissionContext;
class ResourceContext;
+class SiteInstance;
+class SpeechInputManagerDelegate;
+class WebContents;
+class WebContentsView;
class WebUIControllerFactory;
+struct MainFunctionParams;
+struct ShowDesktopNotificationHostMsgParams;
typedef base::Callback< void(const content::MediaStreamDevices&) >
MediaResponseCallback;
diff --git a/content/public/browser/quota_permission_context.h b/content/public/browser/quota_permission_context.h
new file mode 100644
index 0000000..af3c54a
--- /dev/null
+++ b/content/public/browser/quota_permission_context.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
+#define CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
+#pragma once
+
+#include "base/callback.h"
+#include "base/memory/ref_counted.h"
+#include "webkit/quota/quota_types.h"
+
+class GURL;
+
+namespace content {
+
+class QuotaPermissionContext
+ : public base::RefCountedThreadSafe<QuotaPermissionContext> {
+ public:
+ enum QuotaPermissionResponse {
+ QUOTA_PERMISSION_RESPONSE_UNKNOWN,
+ QUOTA_PERMISSION_RESPONSE_ALLOW,
+ QUOTA_PERMISSION_RESPONSE_DISALLOW,
+ QUOTA_PERMISSION_RESPONSE_CANCELLED,
+ };
+
+ typedef base::Callback<void(QuotaPermissionResponse)> PermissionCallback;
+
+ virtual void RequestQuotaPermission(
+ const GURL& origin_url,
+ quota::StorageType type,
+ int64 new_quota,
+ int render_process_id,
+ int render_view_id,
+ const PermissionCallback& callback) = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<QuotaPermissionContext>;
+ virtual ~QuotaPermissionContext() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_