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

Unified Diff: content/public/browser/content_browser_client.h

Issue 990303002: Implement PermissionService::GetNextPermissionChange. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_impl
Patch Set: review comments Created 5 years, 9 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: content/public/browser/content_browser_client.h
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 31959739147ca2cb4c74666050db4a9c7f1c45ef..0b236a326a2c139dd74965c837c95bf638085487 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -453,6 +453,20 @@ class CONTENT_EXPORT ContentBrowserClient {
const GURL& requesting_origin,
const GURL& embedding_origin);
+ // Runs the given |callback| whenever the |permission| associated with the
+ // pair { requesting_origin, embedding_origin } changes.
+ // Returns the subscription_id to be used to unsubscribe.
+ virtual int SubscribePermissionStatusChange(
+ PermissionType permission,
+ BrowserContext* browser_context,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin,
+ const base::Callback<void(PermissionStatus)>& callback);
+
+ virtual void UnsubscribePermissionStatusChange(
+ BrowserContext* browser_context,
+ int subscription_id) {}
+
virtual void ResetPermission(PermissionType permission,
BrowserContext* browser_context,
const GURL& requesting_origin,

Powered by Google App Engine
This is Rietveld 408576698