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

Unified Diff: content/browser/permissions/permission_service_context.h

Issue 750633003: Implement HasPermission() method in PermissionService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include content_common_mojo_bindings.gypi in content.gyp Created 6 years, 1 month 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/browser/permissions/permission_service_context.h
diff --git a/content/browser/permissions/permission_service_context.h b/content/browser/permissions/permission_service_context.h
index 46d6b397026a2ff26d577d6dfe8bff40d8209322..2e1fca1e56d579df94cdfe242ae856a81114331a 100644
--- a/content/browser/permissions/permission_service_context.h
+++ b/content/browser/permissions/permission_service_context.h
@@ -15,6 +15,7 @@ namespace content {
class PermissionService;
class PermissionServiceImpl;
class RenderFrameHost;
+class RenderProcessHost;
// Provides information to a PermissionService. It is used by the
// PermissionService to handle request permission UI.
@@ -23,6 +24,7 @@ class RenderFrameHost;
class PermissionServiceContext : public WebContentsObserver {
public:
explicit PermissionServiceContext(RenderFrameHost* render_frame_host);
+ explicit PermissionServiceContext(RenderProcessHost* render_process_host);
virtual ~PermissionServiceContext();
void CreateService(mojo::InterfaceRequest<PermissionService> request);
@@ -31,6 +33,9 @@ class PermissionServiceContext : public WebContentsObserver {
// connection error in order to get unregistered and killed.
void ServiceHadConnectionError(PermissionServiceImpl* service);
+ BrowserContext* GetBrowserContext() const;
+ GURL GetEmbeddingOrigin() const;
+
private:
// WebContentsObserver
void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
@@ -41,6 +46,7 @@ class PermissionServiceContext : public WebContentsObserver {
void CancelPendingRequests(RenderFrameHost*) const;
RenderFrameHost* render_frame_host_;
+ RenderProcessHost* render_process_host_;
ScopedVector<PermissionServiceImpl> services_;
DISALLOW_COPY_AND_ASSIGN(PermissionServiceContext);

Powered by Google App Engine
This is Rietveld 408576698