summaryrefslogtreecommitdiffstats
path: root/content/browser/quota_permission_context.h
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 06:53:41 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 06:53:41 +0000
commit317f96c98a5a2da64db09d7f717fbadd0586e786 (patch)
tree73b8dc4cf66e294a93759da3b73eca1b6345adca /content/browser/quota_permission_context.h
parentb93a206d2157e787fe522f4e21920e293f52e91f (diff)
downloadchromium_src-317f96c98a5a2da64db09d7f717fbadd0586e786.zip
chromium_src-317f96c98a5a2da64db09d7f717fbadd0586e786.tar.gz
chromium_src-317f96c98a5a2da64db09d7f717fbadd0586e786.tar.bz2
Quota InfoBar
For persistent storage request we need to show 'request quota' infoBar if the requested storage size (or requested new quota size) is greater than the current quota, and to show an infoBar we need to let the browser know which render view is requesting the storage. This patch includes necessary plumbing to send render process_id/view_id to the browser process and the info bar implementation itself. BUG=61676 TEST=none Review URL: http://codereview.chromium.org/6976026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/quota_permission_context.h')
-rw-r--r--content/browser/quota_permission_context.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/content/browser/quota_permission_context.h b/content/browser/quota_permission_context.h
new file mode 100644
index 0000000..97aea6c
--- /dev/null
+++ b/content/browser/quota_permission_context.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2011 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_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
+#define CONTENT_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
+
+#include "base/callback_old.h"
+#include "base/memory/ref_counted.h"
+#include "webkit/quota/quota_types.h"
+
+class GURL;
+
+class QuotaPermissionContext
+ : public base::RefCountedThreadSafe<QuotaPermissionContext> {
+ public:
+ enum Response {
+ kResponseUnknown,
+ kResponseAllow,
+ kResponseDisallow,
+ kResponseCancelled,
+ };
+ typedef Callback1<Response>::Type PermissionCallback;
+
+ virtual void RequestQuotaPermission(
+ const GURL& origin_url,
+ quota::StorageType type,
+ int64 new_quota,
+ int render_process_id,
+ int render_view_id,
+ PermissionCallback* callback) = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<QuotaPermissionContext>;
+ ~QuotaPermissionContext() {}
+};
+
+#endif // CONTENT_BROWSER_QUOTA_PERMISSION_CONTEXT_H_