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_; |
}; |