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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 722153003: Implement basic mojo Permission service and use it for Geolocation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index a5891146486b4618991cd2593c788072d41ab9b2..e96f3a2a07d6060facb44ae3b3f42bdf62382058 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -25,6 +25,8 @@
#include "content/browser/frame_host/render_frame_proxy_host.h"
#include "content/browser/frame_host/render_widget_host_view_child_frame.h"
#include "content/browser/geolocation/geolocation_service_context.h"
+#include "content/browser/permissions/permission_service_context.h"
+#include "content/browser/permissions/permission_service_impl.h"
#include "content/browser/renderer_host/input/input_router.h"
#include "content/browser/renderer_host/input/timeout_monitor.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
@@ -1267,6 +1269,12 @@ void RenderFrameHostImpl::RegisterMojoServices() {
base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission,
base::Unretained(this))));
}
+
+ scoped_ptr<PermissionServiceContext> permission_service_context(
+ new PermissionServiceContext(this));
+ GetServiceRegistry()->AddService(
+ base::Bind(&PermissionServiceImpl::Create,
+ base::Passed(&permission_service_context)));
qsr 2014/11/14 09:20:26 This callback will be run each time something conn
mlamouri (slow - plz ping) 2014/11/14 11:37:11 I might need some deeper understanding on how thin
qsr 2014/11/14 11:49:27 What you register is a factory. Each time somethin
}
void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) {

Powered by Google App Engine
This is Rietveld 408576698