| 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/message_port_message_filter.h" | 81 #include "content/browser/message_port_message_filter.h" |
| 82 #include "content/browser/mime_registry_message_filter.h" | 82 #include "content/browser/mime_registry_message_filter.h" |
| 83 #include "content/browser/mojo/mojo_application_host.h" | 83 #include "content/browser/mojo/mojo_application_host.h" |
| 84 #include "content/browser/mojo/mojo_child_connection.h" | 84 #include "content/browser/mojo/mojo_child_connection.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/media/audio_input_renderer_host.h" | 96 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
| 96 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 97 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
| 97 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 98 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
| 98 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" | 99 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" |
| 99 #include "content/browser/renderer_host/media/video_capture_host.h" | 100 #include "content/browser/renderer_host/media/video_capture_host.h" |
| 100 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" | 101 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 AddFilter(bluetooth_dispatcher_host_.get()); | 1064 AddFilter(bluetooth_dispatcher_host_.get()); |
| 1064 } | 1065 } |
| 1065 } | 1066 } |
| 1066 | 1067 |
| 1067 void RenderProcessHostImpl::RegisterMojoServices() { | 1068 void RenderProcessHostImpl::RegisterMojoServices() { |
| 1068 #if !defined(OS_ANDROID) | 1069 #if !defined(OS_ANDROID) |
| 1069 mojo_application_host_->service_registry()->AddService( | 1070 mojo_application_host_->service_registry()->AddService( |
| 1070 base::Bind(&device::BatteryMonitorImpl::Create)); | 1071 base::Bind(&device::BatteryMonitorImpl::Create)); |
| 1071 | 1072 |
| 1072 mojo_application_host_->service_registry()->AddService( | 1073 mojo_application_host_->service_registry()->AddService( |
| 1074 |
| 1073 base::Bind(&device::VibrationManagerImpl::Create)); | 1075 base::Bind(&device::VibrationManagerImpl::Create)); |
| 1074 #endif | 1076 #endif |
| 1075 | 1077 |
| 1076 mojo_application_host_->service_registry()->AddService( | 1078 mojo_application_host_->service_registry()->AddService( |
| 1077 base::Bind(&PermissionServiceContext::CreateService, | 1079 base::Bind(&PermissionServiceContext::CreateService, |
| 1078 base::Unretained(permission_service_context_.get()))); | 1080 base::Unretained(permission_service_context_.get()))); |
| 1079 | 1081 |
| 1080 mojo_application_host_->service_registry()->AddService(base::Bind( | 1082 mojo_application_host_->service_registry()->AddService(base::Bind( |
| 1081 &BackgroundSyncContextImpl::CreateService, | 1083 &BackgroundSyncContextImpl::CreateService, |
| 1082 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); | 1084 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); |
| 1083 | 1085 |
| 1084 mojo_application_host_->service_registry()->AddService( | 1086 mojo_application_host_->service_registry()->AddService( |
| 1085 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, | 1087 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, |
| 1086 base::Unretained(this))); | 1088 base::Unretained(this))); |
| 1087 | 1089 |
| 1090 mojo_application_host_->service_registry()->AddService( |
| 1091 base::Bind(&AudioOutputImpl::Create, audio_renderer_host_)); |
| 1092 |
| 1088 #if defined(OS_ANDROID) | 1093 #if defined(OS_ANDROID) |
| 1089 ServiceRegistrarAndroid::RegisterProcessHostServices( | 1094 ServiceRegistrarAndroid::RegisterProcessHostServices( |
| 1090 mojo_application_host_->service_registry_android()); | 1095 mojo_application_host_->service_registry_android()); |
| 1091 #endif | 1096 #endif |
| 1092 | 1097 |
| 1093 GetContentClient()->browser()->RegisterRenderProcessMojoServices( | 1098 GetContentClient()->browser()->RegisterRenderProcessMojoServices( |
| 1094 mojo_application_host_->service_registry()); | 1099 mojo_application_host_->service_registry()); |
| 1095 } | 1100 } |
| 1096 | 1101 |
| 1097 void RenderProcessHostImpl::CreateStoragePartitionService( | 1102 void RenderProcessHostImpl::CreateStoragePartitionService( |
| (...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2792 | 2797 |
| 2793 // Skip widgets in other processes. | 2798 // Skip widgets in other processes. |
| 2794 if (rvh->GetProcess()->GetID() != GetID()) | 2799 if (rvh->GetProcess()->GetID() != GetID()) |
| 2795 continue; | 2800 continue; |
| 2796 | 2801 |
| 2797 rvh->OnWebkitPreferencesChanged(); | 2802 rvh->OnWebkitPreferencesChanged(); |
| 2798 } | 2803 } |
| 2799 } | 2804 } |
| 2800 | 2805 |
| 2801 } // namespace content | 2806 } // namespace content |
| OLD | NEW |