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

Unified Diff: content/browser/renderer_host/render_process_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/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 079f6e9dda954727f32c8ccdb2bd3beaebe05540..e11a6b71e91c4df9d92771e2ca33c05554537a5a 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -66,6 +66,8 @@
#include "content/browser/mime_registry_message_filter.h"
#include "content/browser/mojo/mojo_application_host.h"
#include "content/browser/notifications/notification_message_filter.h"
+#include "content/browser/permissions/permission_service_context.h"
+#include "content/browser/permissions/permission_service_impl.h"
#include "content/browser/profiler_message_filter.h"
#include "content/browser/push_messaging/push_messaging_message_filter.h"
#include "content/browser/quota_dispatcher_host.h"
@@ -448,6 +450,7 @@ RenderProcessHostImpl::RenderProcessHostImpl(
within_process_died_observer_(false),
power_monitor_broadcaster_(this),
worker_ref_count_(0),
+ permission_service_context_(new PermissionServiceContext(nullptr)),
weak_factory_(this) {
widget_helper_ = new RenderWidgetHelper();
@@ -876,6 +879,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
void RenderProcessHostImpl::RegisterMojoServices() {
mojo_application_host_->service_registry()->AddService(
base::Bind(&device::BatteryMonitorImpl::Create));
+
+ mojo_application_host_->service_registry()->AddService(
+ base::Bind(&PermissionServiceContext::CreateService,
+ base::Unretained(permission_service_context_.get())));
}
int RenderProcessHostImpl::GetNextRoutingID() {
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698