| OLD | NEW |
| 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 Loading... |
| 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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 #if defined(OS_ANDROID) | 871 #if defined(OS_ANDROID) |
| 870 AddFilter(new ScreenOrientationMessageFilterAndroid()); | 872 AddFilter(new ScreenOrientationMessageFilterAndroid()); |
| 871 #endif | 873 #endif |
| 872 AddFilter(new GeofencingDispatcherHost( | 874 AddFilter(new GeofencingDispatcherHost( |
| 873 storage_partition_impl_->GetGeofencingManager())); | 875 storage_partition_impl_->GetGeofencingManager())); |
| 874 } | 876 } |
| 875 | 877 |
| 876 void RenderProcessHostImpl::RegisterMojoServices() { | 878 void RenderProcessHostImpl::RegisterMojoServices() { |
| 877 mojo_application_host_->service_registry()->AddService( | 879 mojo_application_host_->service_registry()->AddService( |
| 878 base::Bind(&device::BatteryMonitorImpl::Create)); | 880 base::Bind(&device::BatteryMonitorImpl::Create)); |
| 881 |
| 882 scoped_ptr<PermissionServiceContext> permission_service_context( |
| 883 new PermissionServiceContext(nullptr)); |
| 884 mojo_application_host_->service_registry()->AddService( |
| 885 base::Bind(&PermissionServiceImpl::Create, |
| 886 base::Passed(&permission_service_context))); |
| 879 } | 887 } |
| 880 | 888 |
| 881 int RenderProcessHostImpl::GetNextRoutingID() { | 889 int RenderProcessHostImpl::GetNextRoutingID() { |
| 882 return widget_helper_->GetNextRoutingID(); | 890 return widget_helper_->GetNextRoutingID(); |
| 883 } | 891 } |
| 884 | 892 |
| 885 void RenderProcessHostImpl::ResumeDeferredNavigation( | 893 void RenderProcessHostImpl::ResumeDeferredNavigation( |
| 886 const GlobalRequestID& request_id) { | 894 const GlobalRequestID& request_id) { |
| 887 widget_helper_->ResumeDeferredNavigation(request_id); | 895 widget_helper_->ResumeDeferredNavigation(request_id); |
| 888 } | 896 } |
| (...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 | 2246 |
| 2239 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2247 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2240 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2248 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2241 DCHECK_GT(worker_ref_count_, 0); | 2249 DCHECK_GT(worker_ref_count_, 0); |
| 2242 --worker_ref_count_; | 2250 --worker_ref_count_; |
| 2243 if (worker_ref_count_ == 0) | 2251 if (worker_ref_count_ == 0) |
| 2244 Cleanup(); | 2252 Cleanup(); |
| 2245 } | 2253 } |
| 2246 | 2254 |
| 2247 } // namespace content | 2255 } // namespace content |
| OLD | NEW |