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 10 matching lines...) Expand all Loading... |
21 #include "ui/aura/mus/window_compositor_frame_sink.h" | 21 #include "ui/aura/mus/window_compositor_frame_sink.h" |
22 #include "ui/aura/mus/window_mus.h" | 22 #include "ui/aura/mus/window_mus.h" |
23 #include "ui/aura/window_port.h" | 23 #include "ui/aura/window_port.h" |
24 #include "ui/gfx/geometry/rect.h" | 24 #include "ui/gfx/geometry/rect.h" |
25 #include "ui/platform_window/mojo/text_input_state.mojom.h" | 25 #include "ui/platform_window/mojo/text_input_state.mojom.h" |
26 | 26 |
27 namespace aura { | 27 namespace aura { |
28 | 28 |
29 class ClientSurfaceEmbedder; | 29 class ClientSurfaceEmbedder; |
30 class PropertyConverter; | 30 class PropertyConverter; |
31 class SurfaceIdHandler; | |
32 class Window; | 31 class Window; |
33 class WindowPortMusTestApi; | 32 class WindowPortMusTestApi; |
34 class WindowTreeClient; | 33 class WindowTreeClient; |
35 class WindowTreeClientPrivate; | 34 class WindowTreeClientPrivate; |
36 class WindowTreeHostMus; | 35 class WindowTreeHostMus; |
37 | 36 |
38 // WindowPortMus is a WindowPort that forwards calls to WindowTreeClient | 37 // WindowPortMus is a WindowPort that forwards calls to WindowTreeClient |
39 // so that changes are propagated to the server. All changes from | 38 // so that changes are propagated to the server. All changes from |
40 // WindowTreeClient to the underlying Window route through this class (by | 39 // WindowTreeClient to the underlying Window route through this class (by |
41 // way of WindowMus) and are done in such a way that they don't result in | 40 // way of WindowMus) and are done in such a way that they don't result in |
(...skipping 24 matching lines...) Expand all Loading... |
66 std::unique_ptr<WindowCompositorFrameSink> RequestCompositorFrameSink( | 65 std::unique_ptr<WindowCompositorFrameSink> RequestCompositorFrameSink( |
67 ui::mojom::CompositorFrameSinkType type, | 66 ui::mojom::CompositorFrameSinkType type, |
68 scoped_refptr<cc::ContextProvider> context_provider, | 67 scoped_refptr<cc::ContextProvider> context_provider, |
69 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); | 68 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); |
70 | 69 |
71 void AttachCompositorFrameSink( | 70 void AttachCompositorFrameSink( |
72 ui::mojom::CompositorFrameSinkType type, | 71 ui::mojom::CompositorFrameSinkType type, |
73 std::unique_ptr<WindowCompositorFrameSinkBinding> | 72 std::unique_ptr<WindowCompositorFrameSinkBinding> |
74 compositor_frame_sink_binding); | 73 compositor_frame_sink_binding); |
75 | 74 |
76 void set_surface_id_handler(SurfaceIdHandler* surface_id_handler) { | |
77 surface_id_handler_ = surface_id_handler; | |
78 } | |
79 | |
80 private: | 75 private: |
81 friend class WindowPortMusTestApi; | 76 friend class WindowPortMusTestApi; |
82 friend class WindowTreeClient; | 77 friend class WindowTreeClient; |
83 friend class WindowTreeClientPrivate; | 78 friend class WindowTreeClientPrivate; |
84 friend class WindowTreeHostMus; | 79 friend class WindowTreeHostMus; |
85 | 80 |
86 using ServerChangeIdType = uint8_t; | 81 using ServerChangeIdType = uint8_t; |
87 | 82 |
88 // Changes to the underlying Window originating from the server must be done | 83 // Changes to the underlying Window originating from the server must be done |
89 // in such a way that the same change is not applied back to the server. To | 84 // in such a way that the same change is not applied back to the server. To |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 WindowTreeClient* window_tree_client_; | 238 WindowTreeClient* window_tree_client_; |
244 | 239 |
245 Window* window_ = nullptr; | 240 Window* window_ = nullptr; |
246 | 241 |
247 // Used when this window is embedding a client. | 242 // Used when this window is embedding a client. |
248 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder; | 243 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder; |
249 | 244 |
250 ServerChangeIdType next_server_change_id_ = 0; | 245 ServerChangeIdType next_server_change_id_ = 0; |
251 ServerChanges server_changes_; | 246 ServerChanges server_changes_; |
252 | 247 |
253 SurfaceIdHandler* surface_id_handler_ = nullptr; | |
254 cc::SurfaceInfo surface_info_; | 248 cc::SurfaceInfo surface_info_; |
255 | 249 |
256 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; | 250 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; |
257 | 251 |
258 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); | 252 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); |
259 }; | 253 }; |
260 | 254 |
261 } // namespace aura | 255 } // namespace aura |
262 | 256 |
263 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 257 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
OLD | NEW |