| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #include "content/browser/blob_storage/blob_url_loader_factory.h" | 64 #include "content/browser/blob_storage/blob_url_loader_factory.h" |
| 65 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 65 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
| 66 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" | 66 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" |
| 67 #include "content/browser/browser_child_process_host_impl.h" | 67 #include "content/browser/browser_child_process_host_impl.h" |
| 68 #include "content/browser/browser_main.h" | 68 #include "content/browser/browser_main.h" |
| 69 #include "content/browser/browser_main_loop.h" | 69 #include "content/browser/browser_main_loop.h" |
| 70 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 70 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
| 71 #include "content/browser/cache_storage/cache_storage_context_impl.h" | 71 #include "content/browser/cache_storage/cache_storage_context_impl.h" |
| 72 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" | 72 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" |
| 73 #include "content/browser/child_process_security_policy_impl.h" | 73 #include "content/browser/child_process_security_policy_impl.h" |
| 74 #include "content/browser/compositor/surface_utils.h" |
| 74 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 75 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 75 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 76 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
| 76 #include "content/browser/field_trial_recorder.h" | 77 #include "content/browser/field_trial_recorder.h" |
| 77 #include "content/browser/fileapi/fileapi_message_filter.h" | 78 #include "content/browser/fileapi/fileapi_message_filter.h" |
| 78 #include "content/browser/frame_host/render_frame_message_filter.h" | 79 #include "content/browser/frame_host/render_frame_message_filter.h" |
| 79 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 80 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 80 #include "content/browser/gpu/compositor_util.h" | 81 #include "content/browser/gpu/compositor_util.h" |
| 81 #include "content/browser/gpu/gpu_client.h" | 82 #include "content/browser/gpu/gpu_client.h" |
| 82 #include "content/browser/gpu/gpu_data_manager_impl.h" | 83 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 83 #include "content/browser/gpu/gpu_process_host.h" | 84 #include "content/browser/gpu/gpu_process_host.h" |
| (...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 gpu_client_->Add(std::move(request)); | 1633 gpu_client_->Add(std::move(request)); |
| 1633 } | 1634 } |
| 1634 | 1635 |
| 1635 void RenderProcessHostImpl::CreateOffscreenCanvasProvider( | 1636 void RenderProcessHostImpl::CreateOffscreenCanvasProvider( |
| 1636 const service_manager::BindSourceInfo& source_info, | 1637 const service_manager::BindSourceInfo& source_info, |
| 1637 blink::mojom::OffscreenCanvasProviderRequest request) { | 1638 blink::mojom::OffscreenCanvasProviderRequest request) { |
| 1638 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1639 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1639 if (!offscreen_canvas_provider_) { | 1640 if (!offscreen_canvas_provider_) { |
| 1640 // The client id gets converted to a uint32_t in FrameSinkId. | 1641 // The client id gets converted to a uint32_t in FrameSinkId. |
| 1641 uint32_t renderer_client_id = base::checked_cast<uint32_t>(id_); | 1642 uint32_t renderer_client_id = base::checked_cast<uint32_t>(id_); |
| 1642 offscreen_canvas_provider_ = | 1643 offscreen_canvas_provider_ = base::MakeUnique<OffscreenCanvasProviderImpl>( |
| 1643 base::MakeUnique<OffscreenCanvasProviderImpl>(renderer_client_id); | 1644 GetFrameSinkManagerHost(), renderer_client_id); |
| 1644 } | 1645 } |
| 1645 offscreen_canvas_provider_->Add(std::move(request)); | 1646 offscreen_canvas_provider_->Add(std::move(request)); |
| 1646 } | 1647 } |
| 1647 | 1648 |
| 1648 void RenderProcessHostImpl::BindFrameSinkProvider( | 1649 void RenderProcessHostImpl::BindFrameSinkProvider( |
| 1649 const service_manager::BindSourceInfo& source_info, | 1650 const service_manager::BindSourceInfo& source_info, |
| 1650 mojom::FrameSinkProviderRequest request) { | 1651 mojom::FrameSinkProviderRequest request) { |
| 1651 frame_sink_provider_.Bind(std::move(request)); | 1652 frame_sink_provider_.Bind(std::move(request)); |
| 1652 } | 1653 } |
| 1653 | 1654 |
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3625 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3626 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3626 | 3627 |
| 3627 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3628 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3628 // Capture the error message in a crash key value. | 3629 // Capture the error message in a crash key value. |
| 3629 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3630 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3630 bad_message::ReceivedBadMessage(render_process_id, | 3631 bad_message::ReceivedBadMessage(render_process_id, |
| 3631 bad_message::RPH_MOJO_PROCESS_ERROR); | 3632 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3632 } | 3633 } |
| 3633 | 3634 |
| 3634 } // namespace content | 3635 } // namespace content |
| OLD | NEW |