| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 #include "content/browser/mime_registry_message_filter.h" | 81 #include "content/browser/mime_registry_message_filter.h" |
| 82 #include "content/browser/mojo/mojo_application_host.h" | 82 #include "content/browser/mojo/mojo_application_host.h" |
| 83 #include "content/browser/mojo/mojo_child_connection.h" | 83 #include "content/browser/mojo/mojo_child_connection.h" |
| 84 #include "content/browser/navigator_connect/service_port_service_impl.h" | 84 #include "content/browser/navigator_connect/service_port_service_impl.h" |
| 85 #include "content/browser/notifications/notification_message_filter.h" | 85 #include "content/browser/notifications/notification_message_filter.h" |
| 86 #include "content/browser/permissions/permission_service_context.h" | 86 #include "content/browser/permissions/permission_service_context.h" |
| 87 #include "content/browser/permissions/permission_service_impl.h" | 87 #include "content/browser/permissions/permission_service_impl.h" |
| 88 #include "content/browser/profiler_message_filter.h" | 88 #include "content/browser/profiler_message_filter.h" |
| 89 #include "content/browser/push_messaging/push_messaging_message_filter.h" | 89 #include "content/browser/push_messaging/push_messaging_message_filter.h" |
| 90 #include "content/browser/quota_dispatcher_host.h" | 90 #include "content/browser/quota_dispatcher_host.h" |
| 91 #include "content/browser/media/audio_output_impl.h" |
| 91 #include "content/browser/renderer_host/clipboard_message_filter.h" | 92 #include "content/browser/renderer_host/clipboard_message_filter.h" |
| 92 #include "content/browser/renderer_host/database_message_filter.h" | 93 #include "content/browser/renderer_host/database_message_filter.h" |
| 93 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 94 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
| 94 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" | 95 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" |
| 95 #include "content/browser/renderer_host/gpu_message_filter.h" | 96 #include "content/browser/renderer_host/gpu_message_filter.h" |
| 96 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 97 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
| 97 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 98 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
| 98 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 99 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
| 99 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" | 100 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" |
| 100 #include "content/browser/renderer_host/media/video_capture_host.h" | 101 #include "content/browser/renderer_host/media/video_capture_host.h" |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 AddFilter(bluetooth_dispatcher_host_.get()); | 1073 AddFilter(bluetooth_dispatcher_host_.get()); |
| 1073 } | 1074 } |
| 1074 } | 1075 } |
| 1075 | 1076 |
| 1076 void RenderProcessHostImpl::RegisterMojoServices() { | 1077 void RenderProcessHostImpl::RegisterMojoServices() { |
| 1077 #if !defined(OS_ANDROID) | 1078 #if !defined(OS_ANDROID) |
| 1078 mojo_application_host_->service_registry()->AddService( | 1079 mojo_application_host_->service_registry()->AddService( |
| 1079 base::Bind(&device::BatteryMonitorImpl::Create)); | 1080 base::Bind(&device::BatteryMonitorImpl::Create)); |
| 1080 | 1081 |
| 1081 mojo_application_host_->service_registry()->AddService( | 1082 mojo_application_host_->service_registry()->AddService( |
| 1083 |
| 1082 base::Bind(&device::VibrationManagerImpl::Create)); | 1084 base::Bind(&device::VibrationManagerImpl::Create)); |
| 1083 #endif | 1085 #endif |
| 1084 | 1086 |
| 1085 mojo_application_host_->service_registry()->AddService( | 1087 mojo_application_host_->service_registry()->AddService( |
| 1086 base::Bind(&PermissionServiceContext::CreateService, | 1088 base::Bind(&PermissionServiceContext::CreateService, |
| 1087 base::Unretained(permission_service_context_.get()))); | 1089 base::Unretained(permission_service_context_.get()))); |
| 1088 | 1090 |
| 1089 mojo_application_host_->service_registry()->AddService(base::Bind( | 1091 mojo_application_host_->service_registry()->AddService(base::Bind( |
| 1090 &BackgroundSyncContextImpl::CreateService, | 1092 &BackgroundSyncContextImpl::CreateService, |
| 1091 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); | 1093 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); |
| 1092 | 1094 |
| 1093 mojo_application_host_->service_registry()->AddService(base::Bind( | 1095 mojo_application_host_->service_registry()->AddService(base::Bind( |
| 1094 &content::ServicePortServiceImpl::Create, | 1096 &content::ServicePortServiceImpl::Create, |
| 1095 make_scoped_refptr(storage_partition_impl_->GetNavigatorConnectContext()), | 1097 make_scoped_refptr(storage_partition_impl_->GetNavigatorConnectContext()), |
| 1096 message_port_message_filter_)); | 1098 message_port_message_filter_)); |
| 1097 | 1099 |
| 1098 mojo_application_host_->service_registry()->AddService( | 1100 mojo_application_host_->service_registry()->AddService( |
| 1099 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, | 1101 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, |
| 1100 base::Unretained(this))); | 1102 base::Unretained(this))); |
| 1101 | 1103 |
| 1104 mojo_application_host_->service_registry()->AddService( |
| 1105 base::Bind(&AudioOutputImpl::Create, audio_renderer_host_)); |
| 1106 |
| 1102 #if defined(OS_ANDROID) | 1107 #if defined(OS_ANDROID) |
| 1103 ServiceRegistrarAndroid::RegisterProcessHostServices( | 1108 ServiceRegistrarAndroid::RegisterProcessHostServices( |
| 1104 mojo_application_host_->service_registry_android()); | 1109 mojo_application_host_->service_registry_android()); |
| 1105 #endif | 1110 #endif |
| 1106 | 1111 |
| 1107 GetContentClient()->browser()->RegisterRenderProcessMojoServices( | 1112 GetContentClient()->browser()->RegisterRenderProcessMojoServices( |
| 1108 mojo_application_host_->service_registry()); | 1113 mojo_application_host_->service_registry()); |
| 1109 } | 1114 } |
| 1110 | 1115 |
| 1111 void RenderProcessHostImpl::CreateStoragePartitionService( | 1116 void RenderProcessHostImpl::CreateStoragePartitionService( |
| (...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2820 | 2825 |
| 2821 // Skip widgets in other processes. | 2826 // Skip widgets in other processes. |
| 2822 if (rvh->GetProcess()->GetID() != GetID()) | 2827 if (rvh->GetProcess()->GetID() != GetID()) |
| 2823 continue; | 2828 continue; |
| 2824 | 2829 |
| 2825 rvh->OnWebkitPreferencesChanged(); | 2830 rvh->OnWebkitPreferencesChanged(); |
| 2826 } | 2831 } |
| 2827 } | 2832 } |
| 2828 | 2833 |
| 2829 } // namespace content | 2834 } // namespace content |
| OLD | NEW |