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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 59 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
60 #include "content/browser/loader/resource_message_filter.h" 60 #include "content/browser/loader/resource_message_filter.h"
61 #include "content/browser/loader/resource_scheduler_filter.h" 61 #include "content/browser/loader/resource_scheduler_filter.h"
62 #include "content/browser/media/capture/audio_mirroring_manager.h" 62 #include "content/browser/media/capture/audio_mirroring_manager.h"
63 #include "content/browser/media/media_internals.h" 63 #include "content/browser/media/media_internals.h"
64 #include "content/browser/media/midi_host.h" 64 #include "content/browser/media/midi_host.h"
65 #include "content/browser/message_port_message_filter.h" 65 #include "content/browser/message_port_message_filter.h"
66 #include "content/browser/mime_registry_message_filter.h" 66 #include "content/browser/mime_registry_message_filter.h"
67 #include "content/browser/mojo/mojo_application_host.h" 67 #include "content/browser/mojo/mojo_application_host.h"
68 #include "content/browser/notifications/notification_message_filter.h" 68 #include "content/browser/notifications/notification_message_filter.h"
69 #include "content/browser/permissions/permission_service_context.h"
70 #include "content/browser/permissions/permission_service_impl.h"
69 #include "content/browser/profiler_message_filter.h" 71 #include "content/browser/profiler_message_filter.h"
70 #include "content/browser/push_messaging/push_messaging_message_filter.h" 72 #include "content/browser/push_messaging/push_messaging_message_filter.h"
71 #include "content/browser/quota_dispatcher_host.h" 73 #include "content/browser/quota_dispatcher_host.h"
72 #include "content/browser/renderer_host/clipboard_message_filter.h" 74 #include "content/browser/renderer_host/clipboard_message_filter.h"
73 #include "content/browser/renderer_host/database_message_filter.h" 75 #include "content/browser/renderer_host/database_message_filter.h"
74 #include "content/browser/renderer_host/file_utilities_message_filter.h" 76 #include "content/browser/renderer_host/file_utilities_message_filter.h"
75 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" 77 #include "content/browser/renderer_host/gamepad_browser_message_filter.h"
76 #include "content/browser/renderer_host/gpu_message_filter.h" 78 #include "content/browser/renderer_host/gpu_message_filter.h"
77 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" 79 #include "content/browser/renderer_host/media/audio_input_renderer_host.h"
78 #include "content/browser/renderer_host/media/audio_renderer_host.h" 80 #include "content/browser/renderer_host/media/audio_renderer_host.h"
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 #if defined(OS_ANDROID) 870 #if defined(OS_ANDROID)
869 AddFilter(new ScreenOrientationMessageFilterAndroid()); 871 AddFilter(new ScreenOrientationMessageFilterAndroid());
870 #endif 872 #endif
871 AddFilter(new GeofencingDispatcherHost( 873 AddFilter(new GeofencingDispatcherHost(
872 storage_partition_impl_->GetGeofencingManager())); 874 storage_partition_impl_->GetGeofencingManager()));
873 } 875 }
874 876
875 void RenderProcessHostImpl::RegisterMojoServices() { 877 void RenderProcessHostImpl::RegisterMojoServices() {
876 mojo_application_host_->service_registry()->AddService( 878 mojo_application_host_->service_registry()->AddService(
877 base::Bind(&device::BatteryMonitorImpl::Create)); 879 base::Bind(&device::BatteryMonitorImpl::Create));
880
881 scoped_ptr<PermissionServiceContext> permission_service_context(
882 new PermissionServiceContext(nullptr));
883 mojo_application_host_->service_registry()->AddService(
884 base::Bind(&PermissionServiceImpl::Create,
blundell 2014/11/14 08:31:13 I think you should delay adding this until you hav
mlamouri (slow - plz ping) 2014/11/14 11:37:11 I will use it in a short term future. Push, Geoloc
885 base::Passed(&permission_service_context)));
878 } 886 }
879 887
880 int RenderProcessHostImpl::GetNextRoutingID() { 888 int RenderProcessHostImpl::GetNextRoutingID() {
881 return widget_helper_->GetNextRoutingID(); 889 return widget_helper_->GetNextRoutingID();
882 } 890 }
883 891
884 void RenderProcessHostImpl::ResumeDeferredNavigation( 892 void RenderProcessHostImpl::ResumeDeferredNavigation(
885 const GlobalRequestID& request_id) { 893 const GlobalRequestID& request_id) {
886 widget_helper_->ResumeDeferredNavigation(request_id); 894 widget_helper_->ResumeDeferredNavigation(request_id);
887 } 895 }
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 2245
2238 void RenderProcessHostImpl::DecrementWorkerRefCount() { 2246 void RenderProcessHostImpl::DecrementWorkerRefCount() {
2239 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2247 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2240 DCHECK_GT(worker_ref_count_, 0); 2248 DCHECK_GT(worker_ref_count_, 0);
2241 --worker_ref_count_; 2249 --worker_ref_count_;
2242 if (worker_ref_count_ == 0) 2250 if (worker_ref_count_ == 0)
2243 Cleanup(); 2251 Cleanup();
2244 } 2252 }
2245 2253
2246 } // namespace content 2254 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698