OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 5 #ifndef UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
6 #define UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 6 #define UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // Sets whether this window can accept drops, defaults to false. | 70 // Sets whether this window can accept drops, defaults to false. |
71 void SetCanAcceptDrops(bool can_accept_drops); | 71 void SetCanAcceptDrops(bool can_accept_drops); |
72 | 72 |
73 // Embeds a new client in this Window. See WindowTreeClient::Embed() for | 73 // Embeds a new client in this Window. See WindowTreeClient::Embed() for |
74 // details on arguments. | 74 // details on arguments. |
75 void Embed(ui::mojom::WindowTreeClientPtr client, | 75 void Embed(ui::mojom::WindowTreeClientPtr client, |
76 uint32_t flags, | 76 uint32_t flags, |
77 const ui::mojom::WindowTree::EmbedCallback& callback); | 77 const ui::mojom::WindowTree::EmbedCallback& callback); |
78 | 78 |
79 using CompositorFrameSinkCallback = | 79 std::unique_ptr<cc::CompositorFrameSink> RequestCompositorFrameSink( |
80 base::Callback<void(std::unique_ptr<cc::CompositorFrameSink>)>; | |
81 void RequestCompositorFrameSink( | |
82 scoped_refptr<cc::ContextProvider> context_provider, | 80 scoped_refptr<cc::ContextProvider> context_provider, |
83 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 81 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); |
84 const CompositorFrameSinkCallback& callback); | |
85 | |
86 void RequestCompositorFrameSinkInternal( | |
87 scoped_refptr<cc::ContextProvider> context_provider, | |
88 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | |
89 const CompositorFrameSinkCallback& callback); | |
90 | 82 |
91 void AttachCompositorFrameSink( | 83 void AttachCompositorFrameSink( |
92 std::unique_ptr<ui::ClientCompositorFrameSinkBinding> | 84 std::unique_ptr<ui::ClientCompositorFrameSinkBinding> |
93 compositor_frame_sink_binding); | 85 compositor_frame_sink_binding); |
94 | 86 |
95 private: | 87 private: |
96 friend class WindowPortMusTestApi; | 88 friend class WindowPortMusTestApi; |
97 friend class WindowTreeClient; | 89 friend class WindowTreeClient; |
98 friend class WindowTreeClientPrivate; | 90 friend class WindowTreeClientPrivate; |
99 friend class WindowTreeHostMus; | 91 friend class WindowTreeHostMus; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 266 |
275 Window* window_ = nullptr; | 267 Window* window_ = nullptr; |
276 | 268 |
277 // Used when this window is embedding a client. | 269 // Used when this window is embedding a client. |
278 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder_; | 270 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder_; |
279 | 271 |
280 ServerChangeIdType next_server_change_id_ = 0; | 272 ServerChangeIdType next_server_change_id_ = 0; |
281 ServerChanges server_changes_; | 273 ServerChanges server_changes_; |
282 | 274 |
283 cc::FrameSinkId frame_sink_id_; | 275 cc::FrameSinkId frame_sink_id_; |
284 base::Closure pending_compositor_frame_sink_request_; | |
285 | 276 |
286 cc::SurfaceInfo primary_surface_info_; | 277 cc::SurfaceInfo primary_surface_info_; |
287 cc::SurfaceInfo fallback_surface_info_; | 278 cc::SurfaceInfo fallback_surface_info_; |
288 | 279 |
289 cc::LocalSurfaceId local_surface_id_; | 280 cc::LocalSurfaceId local_surface_id_; |
290 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; | 281 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; |
291 gfx::Size last_surface_size_; | 282 gfx::Size last_surface_size_; |
292 | 283 |
293 ui::CursorData cursor_; | 284 ui::CursorData cursor_; |
294 | 285 |
295 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); | 286 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); |
296 }; | 287 }; |
297 | 288 |
298 } // namespace aura | 289 } // namespace aura |
299 | 290 |
300 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 291 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
OLD | NEW |