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

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

Issue 2723983004: Add PermissionManager::GetPermissionStatusForFrame function (Closed)
Patch Set: Add PermissionManager::GetPermissionStatusForFrame function Created 3 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: chrome/browser/permissions/permission_context_base.h
diff --git a/chrome/browser/permissions/permission_context_base.h b/chrome/browser/permissions/permission_context_base.h
index 7aa905e88b58ad4ca0ce34bbef883b59a46d1aa8..0863bde15e1a9642ccf91163ae4cb94e10708d18 100644
--- a/chrome/browser/permissions/permission_context_base.h
+++ b/chrome/browser/permissions/permission_context_base.h
@@ -25,6 +25,7 @@ class PermissionRequestID;
class Profile;
namespace content {
+class RenderFrameHost;
class WebContents;
}
@@ -80,10 +81,14 @@ class PermissionContextBase : public KeyedService {
const BrowserPermissionCallback& callback);
// Returns whether the permission has been granted, denied etc.
+ // |render_frame_host| may be nullptr if the call is coming from a context
+ // other than a specific frame.
// TODO(meredithl): Ensure that the result accurately reflects whether the
// origin is blacklisted for this permission.
- PermissionResult GetPermissionStatus(const GURL& requesting_origin,
- const GURL& embedding_origin) const;
+ PermissionResult GetPermissionStatus(
+ content::RenderFrameHost* render_frame_host,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) const;
// Resets the permission to its default value.
virtual void ResetPermission(const GURL& requesting_origin,
@@ -101,6 +106,7 @@ class PermissionContextBase : public KeyedService {
protected:
virtual ContentSetting GetPermissionStatusInternal(
+ content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
const GURL& embedding_origin) const;

Powered by Google App Engine
This is Rietveld 408576698