Chromium Code Reviews| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 #include "content/browser/blob_storage/blob_dispatcher_host.h" | 60 #include "content/browser/blob_storage/blob_dispatcher_host.h" |
| 61 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 61 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
| 62 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" | 62 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" |
| 63 #include "content/browser/browser_child_process_host_impl.h" | 63 #include "content/browser/browser_child_process_host_impl.h" |
| 64 #include "content/browser/browser_main.h" | 64 #include "content/browser/browser_main.h" |
| 65 #include "content/browser/browser_main_loop.h" | 65 #include "content/browser/browser_main_loop.h" |
| 66 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 66 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
| 67 #include "content/browser/cache_storage/cache_storage_context_impl.h" | 67 #include "content/browser/cache_storage/cache_storage_context_impl.h" |
| 68 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" | 68 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" |
| 69 #include "content/browser/child_process_security_policy_impl.h" | 69 #include "content/browser/child_process_security_policy_impl.h" |
| 70 #include "content/browser/compositor/surface_utils.h" | |
| 70 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 71 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 71 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 72 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
| 72 #include "content/browser/fileapi/fileapi_message_filter.h" | 73 #include "content/browser/fileapi/fileapi_message_filter.h" |
| 73 #include "content/browser/frame_host/render_frame_message_filter.h" | 74 #include "content/browser/frame_host/render_frame_message_filter.h" |
| 74 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 75 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 75 #include "content/browser/gpu/compositor_util.h" | 76 #include "content/browser/gpu/compositor_util.h" |
| 76 #include "content/browser/gpu/gpu_client.h" | 77 #include "content/browser/gpu/gpu_client.h" |
| 77 #include "content/browser/gpu/gpu_data_manager_impl.h" | 78 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 78 #include "content/browser/gpu/gpu_process_host.h" | 79 #include "content/browser/gpu/gpu_process_host.h" |
| 79 #include "content/browser/gpu/shader_cache_factory.h" | 80 #include "content/browser/gpu/shader_cache_factory.h" |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 100 #include "content/browser/push_messaging/push_messaging_message_filter.h" | 101 #include "content/browser/push_messaging/push_messaging_message_filter.h" |
| 101 #include "content/browser/quota_dispatcher_host.h" | 102 #include "content/browser/quota_dispatcher_host.h" |
| 102 #include "content/browser/renderer_host/clipboard_message_filter.h" | 103 #include "content/browser/renderer_host/clipboard_message_filter.h" |
| 103 #include "content/browser/renderer_host/database_message_filter.h" | 104 #include "content/browser/renderer_host/database_message_filter.h" |
| 104 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 105 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
| 105 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 106 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
| 106 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 107 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
| 107 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 108 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
| 108 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" | 109 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" |
| 109 #include "content/browser/renderer_host/media/video_capture_host.h" | 110 #include "content/browser/renderer_host/media/video_capture_host.h" |
| 110 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p rovider_impl.h" | |
| 111 #include "content/browser/renderer_host/offscreen_canvas_surface_factory_impl.h" | 111 #include "content/browser/renderer_host/offscreen_canvas_surface_factory_impl.h" |
| 112 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" | 112 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
| 113 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" | 113 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" |
| 114 #include "content/browser/renderer_host/render_message_filter.h" | 114 #include "content/browser/renderer_host/render_message_filter.h" |
| 115 #include "content/browser/renderer_host/render_view_host_delegate.h" | 115 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 116 #include "content/browser/renderer_host/render_view_host_impl.h" | 116 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 117 #include "content/browser/renderer_host/render_widget_helper.h" | 117 #include "content/browser/renderer_host/render_widget_helper.h" |
| 118 #include "content/browser/renderer_host/render_widget_host_impl.h" | 118 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 119 #include "content/browser/renderer_host/render_widget_host_view_frame_subscriber .h" | 119 #include "content/browser/renderer_host/render_widget_host_view_frame_subscriber .h" |
| 120 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 120 #include "content/browser/renderer_host/text_input_client_message_filter.h" |
| (...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1369 } | 1369 } |
| 1370 | 1370 |
| 1371 void RenderProcessHostImpl::CreateMusGpuRequest(ui::mojom::GpuRequest request) { | 1371 void RenderProcessHostImpl::CreateMusGpuRequest(ui::mojom::GpuRequest request) { |
| 1372 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 1372 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 1373 if (!gpu_client_) | 1373 if (!gpu_client_) |
| 1374 gpu_client_.reset(new GpuClient(GetID())); | 1374 gpu_client_.reset(new GpuClient(GetID())); |
| 1375 gpu_client_->Add(std::move(request)); | 1375 gpu_client_->Add(std::move(request)); |
| 1376 } | 1376 } |
| 1377 | 1377 |
| 1378 void RenderProcessHostImpl::CreateOffscreenCanvasCompositorFrameSinkProvider( | 1378 void RenderProcessHostImpl::CreateOffscreenCanvasCompositorFrameSinkProvider( |
| 1379 blink::mojom::OffscreenCanvasCompositorFrameSinkProviderRequest request) { | 1379 cc::mojom::DisplayCompositorRequest request) { |
| 1380 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1380 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1381 if (!offscreen_canvas_provider_) { | 1381 if (!display_compositor_) { |
| 1382 offscreen_canvas_provider_.reset( | 1382 display_compositor_.reset( |
|
Fady Samuel
2017/02/21 14:16:18
This isn't the right place to use DisplayComposito
| |
| 1383 new OffscreenCanvasCompositorFrameSinkProviderImpl()); | 1383 new ui::DisplayCompositor(std::move(request), GetSurfaceManager())); |
| 1384 } | 1384 } |
| 1385 offscreen_canvas_provider_->Add(std::move(request)); | |
| 1386 } | 1385 } |
| 1387 | 1386 |
| 1388 void RenderProcessHostImpl::CreateStoragePartitionService( | 1387 void RenderProcessHostImpl::CreateStoragePartitionService( |
| 1389 mojo::InterfaceRequest<mojom::StoragePartitionService> request) { | 1388 mojo::InterfaceRequest<mojom::StoragePartitionService> request) { |
| 1390 // DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW! | 1389 // DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW! |
| 1391 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1390 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1392 switches::kMojoLocalStorage)) { | 1391 switches::kMojoLocalStorage)) { |
| 1393 storage_partition_impl_->Bind(std::move(request)); | 1392 storage_partition_impl_->Bind(std::move(request)); |
| 1394 } | 1393 } |
| 1395 } | 1394 } |
| (...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3071 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3070 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3072 | 3071 |
| 3073 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3072 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3074 // Capture the error message in a crash key value. | 3073 // Capture the error message in a crash key value. |
| 3075 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3074 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3076 bad_message::ReceivedBadMessage(render_process_id, | 3075 bad_message::ReceivedBadMessage(render_process_id, |
| 3077 bad_message::RPH_MOJO_PROCESS_ERROR); | 3076 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3078 } | 3077 } |
| 3079 | 3078 |
| 3080 } // namespace content | 3079 } // namespace content |
| OLD | NEW |