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

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

Issue 2908133003: Split GetPermissionStatus into GetPermissionStatusForFrame/Worker
Patch Set: Split GetPermissionStatus into GetPermissionStatusForFrame/Worker Created 3 years, 7 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/permission_manager.h
diff --git a/content/public/browser/permission_manager.h b/content/public/browser/permission_manager.h
index 54de7a2ad9beb309917fb6da914f392baa663b7c..a5e62b49c9af8a295b78b8373eeb7f9876587cd3 100644
--- a/content/public/browser/permission_manager.h
+++ b/content/public/browser/permission_manager.h
@@ -63,13 +63,18 @@ class CONTENT_EXPORT PermissionManager {
// kNoPendingOperation is a no-op.
virtual void CancelPermissionRequest(int request_id) = 0;
- // Returns the permission status of a given requesting_origin/embedding_origin
- // tuple. This is not taking a RenderFrameHost because the call might happen
- // outside of a frame context.
- virtual blink::mojom::PermissionStatus GetPermissionStatus(
- PermissionType permission,
- const GURL& requesting_origin,
- const GURL& embedding_origin) = 0;
+ // Returns the PermissionStatus for a specific RenderFrameHost.
+ virtual blink::mojom::PermissionStatus GetPermissionStatusForFrame(
+ content::PermissionType permission,
+ content::RenderFrameHost* render_frame_host,
+ const GURL& requesting_origin) = 0;
+
+ // Returns the PermissionStatus for a worker. This should not be used for
+ // determining the permission status for a request coming from a
+ // RenderFrameHost.
+ virtual blink::mojom::PermissionStatus GetPermissionStatusForWorker(
+ content::PermissionType permission,
+ const GURL& requesting_origin) = 0;
// Sets the permission back to its default for the requesting_origin/
// embedding_origin tuple.

Powered by Google App Engine
This is Rietveld 408576698