| OLD | NEW |
| 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 #ifndef SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ | 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ |
| 6 #define SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ | 6 #define SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/ipc/compositor_frame.mojom.h" | 9 #include "cc/ipc/compositor_frame.mojom.h" |
| 10 #include "cc/ipc/display_compositor.mojom.h" | 10 #include "cc/ipc/display_compositor.mojom.h" |
| 11 #include "cc/output/context_provider.h" | 11 #include "cc/output/context_provider.h" |
| 12 #include "cc/surfaces/surface_id.h" | 12 #include "cc/surfaces/surface_id.h" |
| 13 #include "mojo/public/cpp/bindings/binding.h" | 13 #include "mojo/public/cpp/bindings/binding.h" |
| 14 #include "services/ui/public/interfaces/window_tree.mojom.h" | 14 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 15 | 15 |
| 16 namespace ui { | 16 namespace ui { |
| 17 namespace ws { | 17 namespace ws { |
| 18 | 18 |
| 19 class ServerWindow; | 19 class ServerWindow; |
| 20 class ServerWindowCompositorFrameSink; | |
| 21 class ServerWindowCompositorFrameSinkManagerTestApi; | 20 class ServerWindowCompositorFrameSinkManagerTestApi; |
| 22 | 21 |
| 23 struct CompositorFrameSinkData { | 22 struct CompositorFrameSinkData { |
| 24 CompositorFrameSinkData(); | 23 CompositorFrameSinkData(); |
| 25 CompositorFrameSinkData(CompositorFrameSinkData&& other); | 24 CompositorFrameSinkData(CompositorFrameSinkData&& other); |
| 26 ~CompositorFrameSinkData(); | 25 ~CompositorFrameSinkData(); |
| 27 | 26 |
| 28 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other); | 27 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other); |
| 29 | 28 |
| 30 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink; | 29 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 44 void CreateRootCompositorFrameSink( | 43 void CreateRootCompositorFrameSink( |
| 45 gfx::AcceleratedWidget widget, | 44 gfx::AcceleratedWidget widget, |
| 46 cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request, | 45 cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request, |
| 47 cc::mojom::MojoCompositorFrameSinkClientPtr client, | 46 cc::mojom::MojoCompositorFrameSinkClientPtr client, |
| 48 cc::mojom::DisplayPrivateAssociatedRequest display_request); | 47 cc::mojom::DisplayPrivateAssociatedRequest display_request); |
| 49 | 48 |
| 50 void CreateCompositorFrameSink( | 49 void CreateCompositorFrameSink( |
| 51 cc::mojom::MojoCompositorFrameSinkRequest request, | 50 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 52 cc::mojom::MojoCompositorFrameSinkClientPtr client); | 51 cc::mojom::MojoCompositorFrameSinkClientPtr client); |
| 53 | 52 |
| 53 // Claims this FrameSinkId will embed |surface_id| so it should own the |
| 54 // temporary reference to |surface_id|. |
| 55 void ClaimTemporaryReference(const cc::SurfaceId& surface_id); |
| 56 |
| 54 private: | 57 private: |
| 55 friend class ServerWindowCompositorFrameSinkManagerTestApi; | 58 friend class ServerWindowCompositorFrameSinkManagerTestApi; |
| 56 friend class ServerWindowCompositorFrameSink; | |
| 57 | 59 |
| 58 ServerWindow* window_; | 60 ServerWindow* const window_; |
| 59 | 61 |
| 60 std::unique_ptr<CompositorFrameSinkData> frame_sink_data_; | 62 std::unique_ptr<CompositorFrameSinkData> frame_sink_data_; |
| 61 | 63 |
| 62 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); | 64 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 } // namespace ws | 67 } // namespace ws |
| 66 } // namespace ui | 68 } // namespace ui |
| 67 | 69 |
| 68 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ | 70 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ |
| OLD | NEW |