| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 #include "content/browser/push_messaging/push_messaging_manager.h" | 102 #include "content/browser/push_messaging/push_messaging_manager.h" |
| 103 #include "content/browser/quota_dispatcher_host.h" | 103 #include "content/browser/quota_dispatcher_host.h" |
| 104 #include "content/browser/renderer_host/clipboard_message_filter.h" | 104 #include "content/browser/renderer_host/clipboard_message_filter.h" |
| 105 #include "content/browser/renderer_host/database_message_filter.h" | 105 #include "content/browser/renderer_host/database_message_filter.h" |
| 106 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 106 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
| 107 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 107 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
| 108 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 108 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
| 109 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 109 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
| 110 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" | 110 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" |
| 111 #include "content/browser/renderer_host/media/video_capture_host.h" | 111 #include "content/browser/renderer_host/media/video_capture_host.h" |
| 112 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p
rovider_impl.h" | 112 #include "content/browser/renderer_host/offscreen_canvas_provider_impl.h" |
| 113 #include "content/browser/renderer_host/offscreen_canvas_surface_factory_impl.h" | |
| 114 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" | 113 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
| 115 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" | 114 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" |
| 116 #include "content/browser/renderer_host/render_message_filter.h" | 115 #include "content/browser/renderer_host/render_message_filter.h" |
| 117 #include "content/browser/renderer_host/render_view_host_delegate.h" | 116 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 118 #include "content/browser/renderer_host/render_view_host_impl.h" | 117 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 119 #include "content/browser/renderer_host/render_widget_helper.h" | 118 #include "content/browser/renderer_host/render_widget_helper.h" |
| 120 #include "content/browser/renderer_host/render_widget_host_impl.h" | 119 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 121 #include "content/browser/renderer_host/render_widget_host_view_frame_subscriber
.h" | 120 #include "content/browser/renderer_host/render_widget_host_view_frame_subscriber
.h" |
| 122 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 121 #include "content/browser/renderer_host/text_input_client_message_filter.h" |
| 123 #include "content/browser/resolve_proxy_msg_helper.h" | 122 #include "content/browser/resolve_proxy_msg_helper.h" |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create)); | 1231 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create)); |
| 1233 | 1232 |
| 1234 AddUIThreadInterface( | 1233 AddUIThreadInterface( |
| 1235 registry.get(), | 1234 registry.get(), |
| 1236 base::Bind( | 1235 base::Bind( |
| 1237 &PaymentAppContextImpl::CreatePaymentManager, | 1236 &PaymentAppContextImpl::CreatePaymentManager, |
| 1238 base::Unretained(storage_partition_impl_->GetPaymentAppContext()))); | 1237 base::Unretained(storage_partition_impl_->GetPaymentAppContext()))); |
| 1239 | 1238 |
| 1240 AddUIThreadInterface( | 1239 AddUIThreadInterface( |
| 1241 registry.get(), | 1240 registry.get(), |
| 1242 base::Bind(&RenderProcessHostImpl:: | 1241 base::Bind(&RenderProcessHostImpl::CreateOffscreenCanvasProvider, |
| 1243 CreateOffscreenCanvasCompositorFrameSinkProvider, | |
| 1244 base::Unretained(this))); | 1242 base::Unretained(this))); |
| 1245 | 1243 |
| 1246 AddUIThreadInterface(registry.get(), | 1244 AddUIThreadInterface(registry.get(), |
| 1247 base::Bind(&RenderProcessHostImpl::BindFrameSinkProvider, | 1245 base::Bind(&RenderProcessHostImpl::BindFrameSinkProvider, |
| 1248 base::Unretained(this))); | 1246 base::Unretained(this))); |
| 1249 | 1247 |
| 1250 AddUIThreadInterface(registry.get(), | |
| 1251 base::Bind(&OffscreenCanvasSurfaceFactoryImpl::Create)); | |
| 1252 AddUIThreadInterface( | 1248 AddUIThreadInterface( |
| 1253 registry.get(), | 1249 registry.get(), |
| 1254 base::Bind(&BackgroundSyncContext::CreateService, | 1250 base::Bind(&BackgroundSyncContext::CreateService, |
| 1255 base::Unretained( | 1251 base::Unretained( |
| 1256 storage_partition_impl_->GetBackgroundSyncContext()))); | 1252 storage_partition_impl_->GetBackgroundSyncContext()))); |
| 1257 AddUIThreadInterface( | 1253 AddUIThreadInterface( |
| 1258 registry.get(), | 1254 registry.get(), |
| 1259 base::Bind(&PlatformNotificationContextImpl::CreateService, | 1255 base::Bind(&PlatformNotificationContextImpl::CreateService, |
| 1260 base::Unretained( | 1256 base::Unretained( |
| 1261 storage_partition_impl_->GetPlatformNotificationContext()), | 1257 storage_partition_impl_->GetPlatformNotificationContext()), |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 listener->OnAssociatedInterfaceRequest(name, request.PassHandle()); | 1353 listener->OnAssociatedInterfaceRequest(name, request.PassHandle()); |
| 1358 } | 1354 } |
| 1359 | 1355 |
| 1360 void RenderProcessHostImpl::CreateMusGpuRequest(ui::mojom::GpuRequest request) { | 1356 void RenderProcessHostImpl::CreateMusGpuRequest(ui::mojom::GpuRequest request) { |
| 1361 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 1357 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 1362 if (!gpu_client_) | 1358 if (!gpu_client_) |
| 1363 gpu_client_.reset(new GpuClient(GetID())); | 1359 gpu_client_.reset(new GpuClient(GetID())); |
| 1364 gpu_client_->Add(std::move(request)); | 1360 gpu_client_->Add(std::move(request)); |
| 1365 } | 1361 } |
| 1366 | 1362 |
| 1367 void RenderProcessHostImpl::CreateOffscreenCanvasCompositorFrameSinkProvider( | 1363 void RenderProcessHostImpl::CreateOffscreenCanvasProvider( |
| 1368 blink::mojom::OffscreenCanvasCompositorFrameSinkProviderRequest request) { | 1364 blink::mojom::OffscreenCanvasProviderRequest request) { |
| 1369 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1365 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1370 if (!offscreen_canvas_provider_) { | 1366 if (!offscreen_canvas_provider_) { |
| 1371 offscreen_canvas_provider_.reset( | 1367 offscreen_canvas_provider_ = |
| 1372 new OffscreenCanvasCompositorFrameSinkProviderImpl()); | 1368 base::MakeUnique<OffscreenCanvasProviderImpl>(); |
| 1373 } | 1369 } |
| 1374 offscreen_canvas_provider_->Add(std::move(request)); | 1370 offscreen_canvas_provider_->Add(std::move(request)); |
| 1375 } | 1371 } |
| 1376 | 1372 |
| 1377 void RenderProcessHostImpl::BindFrameSinkProvider( | 1373 void RenderProcessHostImpl::BindFrameSinkProvider( |
| 1378 mojom::FrameSinkProviderRequest request) { | 1374 mojom::FrameSinkProviderRequest request) { |
| 1379 frame_sink_provider_.Bind(std::move(request)); | 1375 frame_sink_provider_.Bind(std::move(request)); |
| 1380 } | 1376 } |
| 1381 | 1377 |
| 1382 void RenderProcessHostImpl::CreateStoragePartitionService( | 1378 void RenderProcessHostImpl::CreateStoragePartitionService( |
| (...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3088 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3084 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3089 | 3085 |
| 3090 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3086 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3091 // Capture the error message in a crash key value. | 3087 // Capture the error message in a crash key value. |
| 3092 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3088 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3093 bad_message::ReceivedBadMessage(render_process_id, | 3089 bad_message::ReceivedBadMessage(render_process_id, |
| 3094 bad_message::RPH_MOJO_PROCESS_ERROR); | 3090 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3095 } | 3091 } |
| 3096 | 3092 |
| 3097 } // namespace content | 3093 } // namespace content |
| OLD | NEW |