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

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

Issue 2789753002: Convert offscreen canvas to use FrameSinkManagerHost. (Closed)
Patch Set: Fixes. Created 3 years, 8 months 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
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create)); 1228 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create));
1230 1229
1231 AddUIThreadInterface( 1230 AddUIThreadInterface(
1232 registry.get(), 1231 registry.get(),
1233 base::Bind( 1232 base::Bind(
1234 &PaymentAppContextImpl::CreatePaymentManager, 1233 &PaymentAppContextImpl::CreatePaymentManager,
1235 base::Unretained(storage_partition_impl_->GetPaymentAppContext()))); 1234 base::Unretained(storage_partition_impl_->GetPaymentAppContext())));
1236 1235
1237 AddUIThreadInterface( 1236 AddUIThreadInterface(
1238 registry.get(), 1237 registry.get(),
1239 base::Bind(&RenderProcessHostImpl:: 1238 base::Bind(&RenderProcessHostImpl::CreateOffscreenCanvasProvider,
1240 CreateOffscreenCanvasCompositorFrameSinkProvider,
1241 base::Unretained(this))); 1239 base::Unretained(this)));
1242 1240
1243 AddUIThreadInterface(registry.get(),
1244 base::Bind(&OffscreenCanvasSurfaceFactoryImpl::Create));
1245 AddUIThreadInterface( 1241 AddUIThreadInterface(
1246 registry.get(), 1242 registry.get(),
1247 base::Bind(&BackgroundSyncContext::CreateService, 1243 base::Bind(&BackgroundSyncContext::CreateService,
1248 base::Unretained( 1244 base::Unretained(
1249 storage_partition_impl_->GetBackgroundSyncContext()))); 1245 storage_partition_impl_->GetBackgroundSyncContext())));
1250 AddUIThreadInterface( 1246 AddUIThreadInterface(
1251 registry.get(), 1247 registry.get(),
1252 base::Bind(&PlatformNotificationContextImpl::CreateService, 1248 base::Bind(&PlatformNotificationContextImpl::CreateService,
1253 base::Unretained( 1249 base::Unretained(
1254 storage_partition_impl_->GetPlatformNotificationContext()), 1250 storage_partition_impl_->GetPlatformNotificationContext()),
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 listener->OnAssociatedInterfaceRequest(name, request.PassHandle()); 1346 listener->OnAssociatedInterfaceRequest(name, request.PassHandle());
1351 } 1347 }
1352 1348
1353 void RenderProcessHostImpl::CreateMusGpuRequest(ui::mojom::GpuRequest request) { 1349 void RenderProcessHostImpl::CreateMusGpuRequest(ui::mojom::GpuRequest request) {
1354 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1350 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1355 if (!gpu_client_) 1351 if (!gpu_client_)
1356 gpu_client_.reset(new GpuClient(GetID())); 1352 gpu_client_.reset(new GpuClient(GetID()));
1357 gpu_client_->Add(std::move(request)); 1353 gpu_client_->Add(std::move(request));
1358 } 1354 }
1359 1355
1360 void RenderProcessHostImpl::CreateOffscreenCanvasCompositorFrameSinkProvider( 1356 void RenderProcessHostImpl::CreateOffscreenCanvasProvider(
1361 blink::mojom::OffscreenCanvasCompositorFrameSinkProviderRequest request) { 1357 blink::mojom::OffscreenCanvasProviderRequest request) {
1362 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1358 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1363 if (!offscreen_canvas_provider_) { 1359 if (!offscreen_canvas_provider_) {
1364 offscreen_canvas_provider_.reset( 1360 offscreen_canvas_provider_ =
1365 new OffscreenCanvasCompositorFrameSinkProviderImpl()); 1361 base::MakeUnique<OffscreenCanvasProviderImpl>();
1366 } 1362 }
1367 offscreen_canvas_provider_->Add(std::move(request)); 1363 offscreen_canvas_provider_->Add(std::move(request));
1368 } 1364 }
1369 1365
1370 void RenderProcessHostImpl::CreateStoragePartitionService( 1366 void RenderProcessHostImpl::CreateStoragePartitionService(
1371 mojo::InterfaceRequest<mojom::StoragePartitionService> request) { 1367 mojo::InterfaceRequest<mojom::StoragePartitionService> request) {
1372 // DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW! 1368 // DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW!
1373 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1369 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1374 switches::kMojoLocalStorage)) { 1370 switches::kMojoLocalStorage)) {
1375 storage_partition_impl_->Bind(std::move(request)); 1371 storage_partition_impl_->Bind(std::move(request));
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3054 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3059 3055
3060 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3056 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3061 // Capture the error message in a crash key value. 3057 // Capture the error message in a crash key value.
3062 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3058 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3063 bad_message::ReceivedBadMessage(render_process_id, 3059 bad_message::ReceivedBadMessage(render_process_id,
3064 bad_message::RPH_MOJO_PROCESS_ERROR); 3060 bad_message::RPH_MOJO_PROCESS_ERROR);
3065 } 3061 }
3066 3062
3067 } // namespace content 3063 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698