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

Side by Side Diff: content/browser/frame_sink_provider_impl.cc

Issue 2774373002: Use MojoCompositorFrameSink in RendererCompositorFrameSink (Closed)
Patch Set: addressed comments 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #include "content/browser/frame_sink_provider_impl.h"
5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6
7 namespace content {
8
9 FrameSinkProviderImpl::FrameSinkProviderImpl(int32_t process_id)
10 : process_id_(process_id), binding_(this) {}
11
12 FrameSinkProviderImpl::~FrameSinkProviderImpl() = default;
13
14 void FrameSinkProviderImpl::Bind(mojom::FrameSinkProviderRequest request) {
15 if (binding_.is_bound())
Ken Rockot(use gerrit already) 2017/04/10 23:31:11 Some surprising and unexpected behavior could resu
Saman Sami 2017/04/11 00:09:52 Is it appropriate to add a dcheck when a malicious
16 binding_.Close();
17 binding_.Bind(std::move(request));
18 }
19
20 void FrameSinkProviderImpl::CreateForWidget(
21 int32_t widget_id,
22 cc::mojom::MojoCompositorFrameSinkRequest request,
23 cc::mojom::MojoCompositorFrameSinkClientPtr client) {
24 RenderWidgetHostImpl* render_widget_host_impl =
25 RenderWidgetHostImpl::FromID(process_id_, widget_id);
26 if (!render_widget_host_impl) {
27 DLOG(ERROR) << "No RenderWidgetHost exists with id " << widget_id
28 << "in process " << process_id_;
29 return;
30 }
31 render_widget_host_impl->RequestMojoCompositorFrameSink(std::move(request),
32 std::move(client));
33 }
34
35 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698