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

Side by Side Diff: services/ui/ws/compositor_frame_sink_client_binding.h

Issue 2890913002: Add CompositorFrameSinkClientBinding To Be Used By FrameGenerator (Closed)
Patch Set: Address Comments 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
(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
5 #ifndef SERVICES_UI_WS_COMPOSITOR_FRAME_SINK_CLIENT_BINDING_H_
Fady Samuel 2017/05/19 14:21:51 Rename file to compositor_frame_sink_binding.h
Alex Z. 2017/05/19 14:25:23 I followed the naming convention from WindowTreeBi
6 #define SERVICES_UI_WS_COMPOSITOR_FRAME_SINK_CLIENT_BINDING_H_
7
8 #include "base/macros.h"
9 #include "cc/ipc/frame_sink_manager.mojom.h"
10 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h"
11 #include "cc/surfaces/local_surface_id_allocator.h"
12 #include "mojo/public/cpp/bindings/binding.h"
13
14 namespace ui {
15 namespace ws {
16
17 // CompositorFrameSinkClientBinding manages the binding between a FrameGenerator
18 // and its MojoCompositorFrameSink. CompositorFrameSinkClientBinding exists so
19 // that a mock implementation of MojoCompositorFrameSink can be injected for
20 // tests. FrameGenerator owns its associated CompositorFrameSinkClientBinding.
21 class CompositorFrameSinkClientBinding
Fady Samuel 2017/05/19 14:21:51 nit: CompositorFrameSinkClientBinding => Compsitor
22 : public cc::mojom::MojoCompositorFrameSink {
23 public:
24 CompositorFrameSinkClientBinding(
25 cc::mojom::MojoCompositorFrameSinkClient* sink_client,
26 cc::mojom::MojoCompositorFrameSinkClientRequest sink_client_request,
27 cc::mojom::MojoCompositorFrameSinkAssociatedPtr compositor_frame_sink,
28 cc::mojom::DisplayPrivateAssociatedPtr display_private);
29 ~CompositorFrameSinkClientBinding() override;
30
31 private:
32 // cc::mojom::MojoCompositorFrameSink implementation:
33 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
34 cc::CompositorFrame frame) override;
35 void SetNeedsBeginFrame(bool needs_begin_frame) override;
36 void BeginFrameDidNotSwap(const cc::BeginFrameAck& ack) override;
37 void EvictCurrentSurface() override;
38
39 mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient> binding_;
40 cc::mojom::DisplayPrivateAssociatedPtr display_private_;
41 cc::mojom::MojoCompositorFrameSinkAssociatedPtr compositor_frame_sink_;
42 cc::LocalSurfaceId local_surface_id_;
43 cc::LocalSurfaceIdAllocator id_allocator_;
44 gfx::Size last_submitted_frame_size_;
45
46 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkClientBinding);
47 };
48 }
49 }
50
51 #endif // SERVICES_UI_WS_COMPOSITOR_FRAME_SINK_CLIENT_BINDING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698