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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // | 101 // |
102 // And the call from the Window (by way of WindowPort interface) looks like: | 102 // And the call from the Window (by way of WindowPort interface) looks like: |
103 // ServerChangeData change_data; | 103 // ServerChangeData change_data; |
104 // change_data.foo = ...; | 104 // change_data.foo = ...; |
105 // if (!RemoveChangeByTypeAndData(ServerChangeType::FOO, change_data)) | 105 // if (!RemoveChangeByTypeAndData(ServerChangeType::FOO, change_data)) |
106 // window_tree_client_->OnFooChanged(this, ...); | 106 // window_tree_client_->OnFooChanged(this, ...); |
107 enum ServerChangeType { | 107 enum ServerChangeType { |
108 ADD, | 108 ADD, |
109 ADD_TRANSIENT, | 109 ADD_TRANSIENT, |
110 BOUNDS, | 110 BOUNDS, |
| 111 DESTROY, |
111 PROPERTY, | 112 PROPERTY, |
112 REMOVE, | 113 REMOVE, |
113 REMOVE_TRANSIENT, | 114 REMOVE_TRANSIENT, |
114 REORDER, | 115 REORDER, |
115 VISIBLE, | 116 VISIBLE, |
116 }; | 117 }; |
117 | 118 |
118 // Contains data needed to identify a change from the server. | 119 // Contains data needed to identify a change from the server. |
119 struct ServerChangeData { | 120 struct ServerChangeData { |
120 // Applies to ADD, ADD_TRANSIENT, REMOVE, REMOVE_TRANSIENT and REORDER. | 121 // Applies to ADD, ADD_TRANSIENT, REMOVE, REMOVE_TRANSIENT and REORDER. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 ui::mojom::OrderDirection) override; | 186 ui::mojom::OrderDirection) override; |
186 void SetBoundsFromServer(const gfx::Rect& bounds) override; | 187 void SetBoundsFromServer(const gfx::Rect& bounds) override; |
187 void SetVisibleFromServer(bool visible) override; | 188 void SetVisibleFromServer(bool visible) override; |
188 void SetOpacityFromServer(float opacity) override; | 189 void SetOpacityFromServer(float opacity) override; |
189 void SetPredefinedCursorFromServer(ui::mojom::Cursor cursor) override; | 190 void SetPredefinedCursorFromServer(ui::mojom::Cursor cursor) override; |
190 void SetPropertyFromServer( | 191 void SetPropertyFromServer( |
191 const std::string& property_name, | 192 const std::string& property_name, |
192 const std::vector<uint8_t>* property_data) override; | 193 const std::vector<uint8_t>* property_data) override; |
193 void SetSurfaceIdFromServer( | 194 void SetSurfaceIdFromServer( |
194 std::unique_ptr<SurfaceInfo> surface_info) override; | 195 std::unique_ptr<SurfaceInfo> surface_info) override; |
| 196 void DestroyFromServer() override; |
195 void AddTransientChildFromServer(WindowMus* child) override; | 197 void AddTransientChildFromServer(WindowMus* child) override; |
196 void RemoveTransientChildFromServer(WindowMus* child) override; | 198 void RemoveTransientChildFromServer(WindowMus* child) override; |
197 ChangeSource OnTransientChildAdded(WindowMus* child) override; | 199 ChangeSource OnTransientChildAdded(WindowMus* child) override; |
198 ChangeSource OnTransientChildRemoved(WindowMus* child) override; | 200 ChangeSource OnTransientChildRemoved(WindowMus* child) override; |
199 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange( | 201 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange( |
200 const gfx::Rect& bounds) override; | 202 const gfx::Rect& bounds) override; |
201 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange( | 203 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange( |
202 bool value) override; | 204 bool value) override; |
203 void NotifyEmbeddedAppDisconnected() override; | 205 void NotifyEmbeddedAppDisconnected() override; |
204 | 206 |
(...skipping 22 matching lines...) Expand all Loading... |
227 std::unique_ptr<SurfaceInfo> surface_info_; | 229 std::unique_ptr<SurfaceInfo> surface_info_; |
228 | 230 |
229 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; | 231 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; |
230 | 232 |
231 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); | 233 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); |
232 }; | 234 }; |
233 | 235 |
234 } // namespace aura | 236 } // namespace aura |
235 | 237 |
236 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 238 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
OLD | NEW |