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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2614493003: Manage OffscreenCanvasCompositorFrameSink lifetime explicitly (Closed)
Patch Set: Rebased Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 3ffe326790fc8c1f640813b8340a72b47370ae0e..fcee29df75c4cb148710266e4ffb22cf245a928b 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1218,7 +1218,10 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
AddUIThreadInterface(
registry.get(),
- base::Bind(&OffscreenCanvasCompositorFrameSinkProviderImpl::Create));
+ base::Bind(&RenderProcessHostImpl::
+ CreateOffscreenCanvasCompositorFrameSinkProvider,
+ base::Unretained(this)));
+
AddUIThreadInterface(registry.get(),
base::Bind(&OffscreenCanvasSurfaceFactoryImpl::Create));
AddUIThreadInterface(
@@ -1341,6 +1344,16 @@ void RenderProcessHostImpl::CreateMusGpuRequest(ui::mojom::GpuRequest request) {
gpu_client_->Add(std::move(request));
}
+void RenderProcessHostImpl::CreateOffscreenCanvasCompositorFrameSinkProvider(
+ blink::mojom::OffscreenCanvasCompositorFrameSinkProviderRequest request) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ if (!offscreen_canvas_provider_) {
+ offscreen_canvas_provider_.reset(
+ new OffscreenCanvasCompositorFrameSinkProviderImpl());
+ }
+ offscreen_canvas_provider_->Add(std::move(request));
+}
+
void RenderProcessHostImpl::CreateStoragePartitionService(
mojo::InterfaceRequest<mojom::StoragePartitionService> request) {
// DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW!
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698