| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 #include "content/browser/notifications/platform_notification_context_impl.h" | 92 #include "content/browser/notifications/platform_notification_context_impl.h" |
| 93 #include "content/browser/payments/payment_app_manager.h" | 93 #include "content/browser/payments/payment_app_manager.h" |
| 94 #include "content/browser/permissions/permission_service_context.h" | 94 #include "content/browser/permissions/permission_service_context.h" |
| 95 #include "content/browser/permissions/permission_service_impl.h" | 95 #include "content/browser/permissions/permission_service_impl.h" |
| 96 #include "content/browser/profiler_message_filter.h" | 96 #include "content/browser/profiler_message_filter.h" |
| 97 #include "content/browser/push_messaging/push_messaging_message_filter.h" | 97 #include "content/browser/push_messaging/push_messaging_message_filter.h" |
| 98 #include "content/browser/quota_dispatcher_host.h" | 98 #include "content/browser/quota_dispatcher_host.h" |
| 99 #include "content/browser/renderer_host/clipboard_message_filter.h" | 99 #include "content/browser/renderer_host/clipboard_message_filter.h" |
| 100 #include "content/browser/renderer_host/database_message_filter.h" | 100 #include "content/browser/renderer_host/database_message_filter.h" |
| 101 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 101 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
| 102 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" | 102 #include "content/browser/renderer_host/gamepad_monitor.h" |
| 103 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 103 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
| 104 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 104 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
| 105 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 105 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
| 106 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" | 106 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" |
| 107 #include "content/browser/renderer_host/media/video_capture_host.h" | 107 #include "content/browser/renderer_host/media/video_capture_host.h" |
| 108 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p
rovider_impl.h" | 108 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p
rovider_impl.h" |
| 109 #include "content/browser/renderer_host/offscreen_canvas_surface_impl.h" | 109 #include "content/browser/renderer_host/offscreen_canvas_surface_impl.h" |
| 110 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" | 110 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
| 111 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" | 111 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" |
| 112 #include "content/browser/renderer_host/render_message_filter.h" | 112 #include "content/browser/renderer_host/render_message_filter.h" |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 GetContentClient()->browser()->CreateQuotaPermissionContext())); | 1165 GetContentClient()->browser()->CreateQuotaPermissionContext())); |
| 1166 | 1166 |
| 1167 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( | 1167 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( |
| 1168 static_cast<ServiceWorkerContextWrapper*>( | 1168 static_cast<ServiceWorkerContextWrapper*>( |
| 1169 storage_partition_impl_->GetServiceWorkerContext())); | 1169 storage_partition_impl_->GetServiceWorkerContext())); |
| 1170 notification_message_filter_ = new NotificationMessageFilter( | 1170 notification_message_filter_ = new NotificationMessageFilter( |
| 1171 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), | 1171 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), |
| 1172 resource_context, service_worker_context, browser_context); | 1172 resource_context, service_worker_context, browser_context); |
| 1173 AddFilter(notification_message_filter_.get()); | 1173 AddFilter(notification_message_filter_.get()); |
| 1174 | 1174 |
| 1175 AddFilter(new GamepadBrowserMessageFilter()); | |
| 1176 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 1175 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
| 1177 AddFilter(new HistogramMessageFilter()); | 1176 AddFilter(new HistogramMessageFilter()); |
| 1178 AddFilter(new MemoryMessageFilter(this)); | 1177 AddFilter(new MemoryMessageFilter(this)); |
| 1179 AddFilter(new PushMessagingMessageFilter( | 1178 AddFilter(new PushMessagingMessageFilter( |
| 1180 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 1179 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
| 1181 #if defined(OS_ANDROID) | 1180 #if defined(OS_ANDROID) |
| 1182 AddFilter(new ScreenOrientationMessageFilterAndroid()); | 1181 AddFilter(new ScreenOrientationMessageFilterAndroid()); |
| 1183 synchronous_compositor_filter_ = | 1182 synchronous_compositor_filter_ = |
| 1184 new SynchronousCompositorBrowserFilter(GetID()); | 1183 new SynchronousCompositorBrowserFilter(GetID()); |
| 1185 AddFilter(synchronous_compositor_filter_.get()); | 1184 AddFilter(synchronous_compositor_filter_.get()); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 base::Bind(&DeviceOrientationAbsoluteHost::Create)); | 1278 base::Bind(&DeviceOrientationAbsoluteHost::Create)); |
| 1280 #else | 1279 #else |
| 1281 // On platforms other than Android the device sensors implementations run on | 1280 // On platforms other than Android the device sensors implementations run on |
| 1282 // the IO thread. | 1281 // the IO thread. |
| 1283 registry->AddInterface(base::Bind(&DeviceLightHost::Create)); | 1282 registry->AddInterface(base::Bind(&DeviceLightHost::Create)); |
| 1284 registry->AddInterface(base::Bind(&DeviceMotionHost::Create)); | 1283 registry->AddInterface(base::Bind(&DeviceMotionHost::Create)); |
| 1285 registry->AddInterface(base::Bind(&DeviceOrientationHost::Create)); | 1284 registry->AddInterface(base::Bind(&DeviceOrientationHost::Create)); |
| 1286 registry->AddInterface(base::Bind(&DeviceOrientationAbsoluteHost::Create)); | 1285 registry->AddInterface(base::Bind(&DeviceOrientationAbsoluteHost::Create)); |
| 1287 #endif // defined(OS_ANDROID) | 1286 #endif // defined(OS_ANDROID) |
| 1288 | 1287 |
| 1288 registry->AddInterface(base::Bind(&GamepadMonitor::Create)); |
| 1289 |
| 1289 registry->AddInterface( | 1290 registry->AddInterface( |
| 1290 base::Bind(&VideoCaptureHost::Create, | 1291 base::Bind(&VideoCaptureHost::Create, |
| 1291 BrowserMainLoop::GetInstance()->media_stream_manager())); | 1292 BrowserMainLoop::GetInstance()->media_stream_manager())); |
| 1292 | 1293 |
| 1293 // This is to support usage of WebSockets in cases in which there is no | 1294 // This is to support usage of WebSockets in cases in which there is no |
| 1294 // associated RenderFrame (e.g., Shared Workers). | 1295 // associated RenderFrame (e.g., Shared Workers). |
| 1295 AddUIThreadInterface( | 1296 AddUIThreadInterface( |
| 1296 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), | 1297 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), |
| 1297 MSG_ROUTING_NONE)); | 1298 MSG_ROUTING_NONE)); |
| 1298 | 1299 |
| (...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3002 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3003 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3003 | 3004 |
| 3004 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3005 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3005 // Capture the error message in a crash key value. | 3006 // Capture the error message in a crash key value. |
| 3006 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3007 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3007 bad_message::ReceivedBadMessage(render_process_id, | 3008 bad_message::ReceivedBadMessage(render_process_id, |
| 3008 bad_message::RPH_MOJO_PROCESS_ERROR); | 3009 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3009 } | 3010 } |
| 3010 | 3011 |
| 3011 } // namespace content | 3012 } // namespace content |
| OLD | NEW |