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

Side by Side Diff: services/ui/ws/server_window_compositor_frame_sink_manager.cc

Issue 2878113002: mus: Embedder can request and observe BeginFrame for embedded client. (Closed)
Patch Set: . Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "services/ui/ws/server_window_compositor_frame_sink_manager.h" 5 #include "services/ui/ws/server_window_compositor_frame_sink_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "mojo/public/cpp/bindings/strong_binding.h" 9 #include "mojo/public/cpp/bindings/strong_binding.h"
10 #include "services/ui/ws/ids.h" 10 #include "services/ui/ws/ids.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 void ServerWindowCompositorFrameSinkManager::ClaimTemporaryReference( 57 void ServerWindowCompositorFrameSinkManager::ClaimTemporaryReference(
58 const cc::SurfaceId& surface_id) { 58 const cc::SurfaceId& surface_id) {
59 if (!compositor_frame_sink_.is_bound()) { 59 if (!compositor_frame_sink_.is_bound()) {
60 pending_compositor_frame_sink_request_ = 60 pending_compositor_frame_sink_request_ =
61 mojo::MakeRequest(&compositor_frame_sink_); 61 mojo::MakeRequest(&compositor_frame_sink_);
62 } 62 }
63 compositor_frame_sink_->ClaimTemporaryReference(surface_id); 63 compositor_frame_sink_->ClaimTemporaryReference(surface_id);
64 } 64 }
65 65
66 void ServerWindowCompositorFrameSinkManager::RequestBeginFrames(
67 cc::mojom::FrameSinkObserverPtr observer) {
68 if (!compositor_frame_sink_.is_bound()) {
69 pending_compositor_frame_sink_request_ =
70 mojo::MakeRequest(&compositor_frame_sink_);
71 }
72 compositor_frame_sink_->RequestBeginFrames(std::move(observer));
73 }
74
66 } // namespace ws 75 } // namespace ws
67 } // namespace ui 76 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698