OLD | NEW |
(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 COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_BASE_H_ |
| 6 #define COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_BASE_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" |
| 13 #include "components/display_compositor/gpu_compositor_frame_sink.h" |
| 14 #include "mojo/public/cpp/bindings/binding.h" |
| 15 |
| 16 namespace display_compositor { |
| 17 |
| 18 // Server side representation of a WindowSurface. |
| 19 class DISPLAY_COMPOSITOR_EXPORT GpuCompositorFrameSinkBase |
| 20 : public GpuCompositorFrameSink, |
| 21 public NON_EXPORTED_BASE(cc::mojom::MojoCompositorFrameSinkPrivate) { |
| 22 public: |
| 23 GpuCompositorFrameSinkBase( |
| 24 GpuCompositorFrameSinkDelegate* delegate, |
| 25 std::unique_ptr<cc::CompositorFrameSinkSupport>, |
| 26 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, |
| 27 cc::mojom::MojoCompositorFrameSinkClientPtr client); |
| 28 |
| 29 ~GpuCompositorFrameSinkBase() override; |
| 30 |
| 31 // cc::mojom::MojoCompositorFrameSinkPrivate: |
| 32 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override; |
| 33 void RemoveChildFrameSink( |
| 34 const cc::FrameSinkId& child_frame_sink_id) override; |
| 35 |
| 36 protected: |
| 37 void OnPrivateConnectionLost(); |
| 38 |
| 39 private: |
| 40 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> |
| 41 compositor_frame_sink_private_binding_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSinkBase); |
| 44 }; |
| 45 |
| 46 } // namespace display_compositor |
| 47 |
| 48 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_BASE_H_ |
OLD | NEW |