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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "services/ui/public/interfaces/cursor.mojom.h" | 15 #include "services/ui/public/interfaces/cursor.mojom.h" |
16 #include "services/ui/public/interfaces/window_tree.mojom.h" | 16 #include "services/ui/public/interfaces/window_tree.mojom.h" |
17 #include "services/ui/public/interfaces/window_tree_constants.mojom.h" | 17 #include "services/ui/public/interfaces/window_tree_constants.mojom.h" |
18 #include "ui/aura/aura_export.h" | 18 #include "ui/aura/aura_export.h" |
19 #include "ui/aura/mus/mus_types.h" | 19 #include "ui/aura/mus/mus_types.h" |
20 #include "ui/aura/mus/window_compositor_frame_sink.h" | 20 #include "ui/aura/mus/window_compositor_frame_sink.h" |
21 #include "ui/aura/mus/window_mus.h" | 21 #include "ui/aura/mus/window_mus.h" |
22 #include "ui/aura/window_port.h" | 22 #include "ui/aura/window_port.h" |
23 #include "ui/gfx/geometry/rect.h" | 23 #include "ui/gfx/geometry/rect.h" |
24 #include "ui/platform_window/mojo/text_input_state.mojom.h" | 24 #include "ui/platform_window/mojo/text_input_state.mojom.h" |
25 | 25 |
26 namespace ui { | |
27 class Layer; | |
28 } | |
29 | |
26 namespace aura { | 30 namespace aura { |
27 | 31 |
28 class PropertyConverter; | 32 class PropertyConverter; |
29 class SurfaceIdHandler; | 33 class SurfaceIdHandler; |
30 class Window; | 34 class Window; |
31 class WindowPortMusTestApi; | 35 class WindowPortMusTestApi; |
32 class WindowTreeClient; | 36 class WindowTreeClient; |
33 class WindowTreeClientPrivate; | 37 class WindowTreeClientPrivate; |
34 class WindowTreeHostMus; | 38 class WindowTreeHostMus; |
35 | 39 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 // If there is a schedule change matching |type| and |data| it is removed and | 192 // If there is a schedule change matching |type| and |data| it is removed and |
189 // true is returned. If no matching change is scheduled returns false. | 193 // true is returned. If no matching change is scheduled returns false. |
190 bool RemoveChangeByTypeAndData(const ServerChangeType type, | 194 bool RemoveChangeByTypeAndData(const ServerChangeType type, |
191 const ServerChangeData& data); | 195 const ServerChangeData& data); |
192 | 196 |
193 ServerChanges::iterator FindChangeByTypeAndData(const ServerChangeType type, | 197 ServerChanges::iterator FindChangeByTypeAndData(const ServerChangeType type, |
194 const ServerChangeData& data); | 198 const ServerChangeData& data); |
195 | 199 |
196 PropertyConverter* GetPropertyConverter(); | 200 PropertyConverter* GetPropertyConverter(); |
197 | 201 |
202 // Used when this window is embedding a client. Updates the surface layer | |
203 // corresponding to the client with the new surface. | |
204 void UpdateSurfaceLayer(SurfaceInfo* surface_info); | |
205 | |
198 // WindowMus: | 206 // WindowMus: |
199 Window* GetWindow() override; | 207 Window* GetWindow() override; |
200 void AddChildFromServer(WindowMus* window) override; | 208 void AddChildFromServer(WindowMus* window) override; |
201 void RemoveChildFromServer(WindowMus* child) override; | 209 void RemoveChildFromServer(WindowMus* child) override; |
202 void ReorderFromServer(WindowMus* child, | 210 void ReorderFromServer(WindowMus* child, |
203 WindowMus* relative, | 211 WindowMus* relative, |
204 ui::mojom::OrderDirection) override; | 212 ui::mojom::OrderDirection) override; |
205 void SetBoundsFromServer(const gfx::Rect& bounds) override; | 213 void SetBoundsFromServer(const gfx::Rect& bounds) override; |
206 void SetVisibleFromServer(bool visible) override; | 214 void SetVisibleFromServer(bool visible) override; |
207 void SetOpacityFromServer(float opacity) override; | 215 void SetOpacityFromServer(float opacity) override; |
(...skipping 28 matching lines...) Expand all Loading... | |
236 const gfx::Rect& new_bounds) override; | 244 const gfx::Rect& new_bounds) override; |
237 std::unique_ptr<WindowPortPropertyData> OnWillChangeProperty( | 245 std::unique_ptr<WindowPortPropertyData> OnWillChangeProperty( |
238 const void* key) override; | 246 const void* key) override; |
239 void OnPropertyChanged(const void* key, | 247 void OnPropertyChanged(const void* key, |
240 std::unique_ptr<WindowPortPropertyData> data) override; | 248 std::unique_ptr<WindowPortPropertyData> data) override; |
241 | 249 |
242 WindowTreeClient* window_tree_client_; | 250 WindowTreeClient* window_tree_client_; |
243 | 251 |
244 Window* window_ = nullptr; | 252 Window* window_ = nullptr; |
245 | 253 |
254 // Used when this window is embedding a client. Contains the client's content. | |
sky
2016/12/16 21:50:29
Could you isolate all the state related to embeddi
mfomitchev
2016/12/23 00:03:49
Done.
| |
255 std::unique_ptr<ui::Layer> surface_layer_; | |
256 | |
257 // Serves as a parent of clipping_layer_, used for clipping the surface layer | |
258 // to the window bounds. | |
259 std::unique_ptr<ui::Layer> clipping_layer_; | |
260 | |
246 ServerChangeIdType next_server_change_id_ = 0; | 261 ServerChangeIdType next_server_change_id_ = 0; |
247 ServerChanges server_changes_; | 262 ServerChanges server_changes_; |
248 | 263 |
249 SurfaceIdHandler* surface_id_handler_ = nullptr; | 264 SurfaceIdHandler* surface_id_handler_ = nullptr; |
250 std::unique_ptr<SurfaceInfo> surface_info_; | 265 std::unique_ptr<SurfaceInfo> surface_info_; |
251 | 266 |
252 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; | 267 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; |
253 | 268 |
254 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); | 269 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); |
255 }; | 270 }; |
256 | 271 |
257 } // namespace aura | 272 } // namespace aura |
258 | 273 |
259 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 274 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
OLD | NEW |