Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2514923002: content: Use mus client-lib's gpu-service from renderers. (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
64 #include "content/browser/cache_storage/cache_storage_context_impl.h" 64 #include "content/browser/cache_storage/cache_storage_context_impl.h"
65 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" 65 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h"
66 #include "content/browser/child_process_security_policy_impl.h" 66 #include "content/browser/child_process_security_policy_impl.h"
67 #include "content/browser/device_sensors/device_sensor_host.h" 67 #include "content/browser/device_sensors/device_sensor_host.h"
68 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 68 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
69 #include "content/browser/dom_storage/dom_storage_message_filter.h" 69 #include "content/browser/dom_storage/dom_storage_message_filter.h"
70 #include "content/browser/fileapi/fileapi_message_filter.h" 70 #include "content/browser/fileapi/fileapi_message_filter.h"
71 #include "content/browser/frame_host/render_frame_message_filter.h" 71 #include "content/browser/frame_host/render_frame_message_filter.h"
72 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 72 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
73 #include "content/browser/gpu/compositor_util.h" 73 #include "content/browser/gpu/compositor_util.h"
74 #include "content/browser/gpu/gpu_client.h"
74 #include "content/browser/gpu/gpu_data_manager_impl.h" 75 #include "content/browser/gpu/gpu_data_manager_impl.h"
75 #include "content/browser/gpu/gpu_process_host.h" 76 #include "content/browser/gpu/gpu_process_host.h"
76 #include "content/browser/gpu/shader_cache_factory.h" 77 #include "content/browser/gpu/shader_cache_factory.h"
77 #include "content/browser/histogram_message_filter.h" 78 #include "content/browser/histogram_message_filter.h"
78 #include "content/browser/indexed_db/indexed_db_context_impl.h" 79 #include "content/browser/indexed_db/indexed_db_context_impl.h"
79 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 80 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
80 #include "content/browser/loader/resource_message_filter.h" 81 #include "content/browser/loader/resource_message_filter.h"
81 #include "content/browser/loader/resource_scheduler_filter.h" 82 #include "content/browser/loader/resource_scheduler_filter.h"
82 #include "content/browser/loader/url_loader_factory_impl.h" 83 #include "content/browser/loader/url_loader_factory_impl.h"
83 #include "content/browser/media/capture/audio_mirroring_manager.h" 84 #include "content/browser/media/capture/audio_mirroring_manager.h"
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 // On platforms other than Android the device sensors implementations run on 1280 // On platforms other than Android the device sensors implementations run on
1280 // the IO thread. 1281 // the IO thread.
1281 registry->AddInterface(base::Bind(&DeviceLightHost::Create)); 1282 registry->AddInterface(base::Bind(&DeviceLightHost::Create));
1282 registry->AddInterface(base::Bind(&DeviceMotionHost::Create)); 1283 registry->AddInterface(base::Bind(&DeviceMotionHost::Create));
1283 registry->AddInterface(base::Bind(&DeviceOrientationHost::Create)); 1284 registry->AddInterface(base::Bind(&DeviceOrientationHost::Create));
1284 registry->AddInterface(base::Bind(&DeviceOrientationAbsoluteHost::Create)); 1285 registry->AddInterface(base::Bind(&DeviceOrientationAbsoluteHost::Create));
1285 #endif // defined(OS_ANDROID) 1286 #endif // defined(OS_ANDROID)
1286 1287
1287 registry->AddInterface(base::Bind(&device::GamepadMonitor::Create)); 1288 registry->AddInterface(base::Bind(&device::GamepadMonitor::Create));
1288 1289
1290 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest,
1291 base::Unretained(this)));
1292
1289 registry->AddInterface( 1293 registry->AddInterface(
1290 base::Bind(&VideoCaptureHost::Create, 1294 base::Bind(&VideoCaptureHost::Create,
1291 BrowserMainLoop::GetInstance()->media_stream_manager())); 1295 BrowserMainLoop::GetInstance()->media_stream_manager()));
1292 1296
1293 // This is to support usage of WebSockets in cases in which there is no 1297 // This is to support usage of WebSockets in cases in which there is no
1294 // associated RenderFrame (e.g., Shared Workers). 1298 // associated RenderFrame (e.g., Shared Workers).
1295 AddUIThreadInterface( 1299 AddUIThreadInterface(
1296 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), 1300 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(),
1297 MSG_ROUTING_NONE)); 1301 MSG_ROUTING_NONE));
1298 1302
(...skipping 27 matching lines...) Expand all
1326 void RenderProcessHostImpl::GetAssociatedInterface( 1330 void RenderProcessHostImpl::GetAssociatedInterface(
1327 const std::string& name, 1331 const std::string& name,
1328 mojom::AssociatedInterfaceAssociatedRequest request) { 1332 mojom::AssociatedInterfaceAssociatedRequest request) {
1329 int32_t routing_id = static_cast<int32_t>(reinterpret_cast<uintptr_t>( 1333 int32_t routing_id = static_cast<int32_t>(reinterpret_cast<uintptr_t>(
1330 associated_interface_provider_bindings_.dispatch_context())); 1334 associated_interface_provider_bindings_.dispatch_context()));
1331 IPC::Listener* listener = listeners_.Lookup(routing_id); 1335 IPC::Listener* listener = listeners_.Lookup(routing_id);
1332 if (listener) 1336 if (listener)
1333 listener->OnAssociatedInterfaceRequest(name, request.PassHandle()); 1337 listener->OnAssociatedInterfaceRequest(name, request.PassHandle());
1334 } 1338 }
1335 1339
1340 void RenderProcessHostImpl::CreateMusGpuRequest(ui::mojom::GpuRequest request) {
1341 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1342 if (!gpu_client_)
1343 gpu_client_.reset(new GpuClient(GetID()));
1344 gpu_client_->Add(std::move(request));
1345 }
1346
1336 void RenderProcessHostImpl::CreateStoragePartitionService( 1347 void RenderProcessHostImpl::CreateStoragePartitionService(
1337 mojo::InterfaceRequest<mojom::StoragePartitionService> request) { 1348 mojo::InterfaceRequest<mojom::StoragePartitionService> request) {
1338 // DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW! 1349 // DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW!
1339 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1350 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1340 switches::kMojoLocalStorage)) { 1351 switches::kMojoLocalStorage)) {
1341 storage_partition_impl_->Bind(std::move(request)); 1352 storage_partition_impl_->Bind(std::move(request));
1342 } 1353 }
1343 } 1354 }
1344 1355
1345 int RenderProcessHostImpl::GetNextRoutingID() { 1356 int RenderProcessHostImpl::GetNextRoutingID() {
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3014 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3004 3015
3005 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3016 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3006 // Capture the error message in a crash key value. 3017 // Capture the error message in a crash key value.
3007 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3018 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3008 bad_message::ReceivedBadMessage(render_process_id, 3019 bad_message::ReceivedBadMessage(render_process_id,
3009 bad_message::RPH_MOJO_PROCESS_ERROR); 3020 bad_message::RPH_MOJO_PROCESS_ERROR);
3010 } 3021 }
3011 3022
3012 } // namespace content 3023 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698