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

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

Issue 2932893002: BrowserMainLoop owns FrameSinkManagerHost (Closed)
Patch Set: Fix offscreen canvas unit tests Created 3 years, 6 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 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 gpu_client_->Add(std::move(request)); 1632 gpu_client_->Add(std::move(request));
1633 } 1633 }
1634 1634
1635 void RenderProcessHostImpl::CreateOffscreenCanvasProvider( 1635 void RenderProcessHostImpl::CreateOffscreenCanvasProvider(
1636 const service_manager::BindSourceInfo& source_info, 1636 const service_manager::BindSourceInfo& source_info,
1637 blink::mojom::OffscreenCanvasProviderRequest request) { 1637 blink::mojom::OffscreenCanvasProviderRequest request) {
1638 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1638 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1639 if (!offscreen_canvas_provider_) { 1639 if (!offscreen_canvas_provider_) {
1640 // The client id gets converted to a uint32_t in FrameSinkId. 1640 // The client id gets converted to a uint32_t in FrameSinkId.
1641 uint32_t renderer_client_id = base::checked_cast<uint32_t>(id_); 1641 uint32_t renderer_client_id = base::checked_cast<uint32_t>(id_);
1642 offscreen_canvas_provider_ = 1642 offscreen_canvas_provider_ = base::MakeUnique<OffscreenCanvasProviderImpl>(
1643 base::MakeUnique<OffscreenCanvasProviderImpl>(renderer_client_id); 1643 BrowserMainLoop::GetInstance()->frame_sink_manager_host(),
1644 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 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3622 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3622 3623
3623 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3624 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3624 // Capture the error message in a crash key value. 3625 // Capture the error message in a crash key value.
3625 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3626 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3626 bad_message::ReceivedBadMessage(render_process_id, 3627 bad_message::ReceivedBadMessage(render_process_id,
3627 bad_message::RPH_MOJO_PROCESS_ERROR); 3628 bad_message::RPH_MOJO_PROCESS_ERROR);
3628 } 3629 }
3629 3630
3630 } // namespace content 3631 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698