Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3844)

Unified Diff: chrome/browser/content_settings/permission_context_base.h

Issue 459953002: Migrate geolocation permissions to the new common permission class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/permission_context_base.h
diff --git a/chrome/browser/content_settings/permission_context_base.h b/chrome/browser/content_settings/permission_context_base.h
index bb5c68a96114631f8536d5ef36eb7fa137238084..87b8afc62a8b3cef5ab0036aad37f53b409333ba 100644
--- a/chrome/browser/content_settings/permission_context_base.h
+++ b/chrome/browser/content_settings/permission_context_base.h
@@ -63,6 +63,11 @@ class PermissionContextBase : public KeyedService {
bool user_gesture,
const BrowserPermissionCallback& callback);
+ // Withdraw an existing permission request, no op if the permission request
+ // was already cancelled by some other means.
+ virtual void CancelPermissionRequest(content::WebContents* web_contents,
+ const PermissionRequestID& id);
+
protected:
// Decide whether the permission should be granted.
// Calls PermissionDecided if permission can be decided non-interactively,
@@ -116,6 +121,8 @@ class PermissionContextBase : public KeyedService {
base::ScopedPtrHashMap<std::string, PermissionBubbleRequest>
pending_bubbles_;
+ // Must be the last member, to ensure that it will be
+ // destroyed first, which will invalidate weak pointers
base::WeakPtrFactory<PermissionContextBase> weak_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698