| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 bool RemoveChangeByTypeAndData(const ServerChangeType type, | 185 bool RemoveChangeByTypeAndData(const ServerChangeType type, |
| 186 const ServerChangeData& data); | 186 const ServerChangeData& data); |
| 187 | 187 |
| 188 ServerChanges::iterator FindChangeByTypeAndData(const ServerChangeType type, | 188 ServerChanges::iterator FindChangeByTypeAndData(const ServerChangeType type, |
| 189 const ServerChangeData& data); | 189 const ServerChangeData& data); |
| 190 | 190 |
| 191 PropertyConverter* GetPropertyConverter(); | 191 PropertyConverter* GetPropertyConverter(); |
| 192 | 192 |
| 193 // WindowMus: | 193 // WindowMus: |
| 194 Window* GetWindow() override; | 194 Window* GetWindow() override; |
| 195 void SetLayerType(ui::LayerType layer_type) override; |
| 196 ui::LayerType GetLayerType() const override; |
| 195 void AddChildFromServer(WindowMus* window) override; | 197 void AddChildFromServer(WindowMus* window) override; |
| 196 void RemoveChildFromServer(WindowMus* child) override; | 198 void RemoveChildFromServer(WindowMus* child) override; |
| 197 void ReorderFromServer(WindowMus* child, | 199 void ReorderFromServer(WindowMus* child, |
| 198 WindowMus* relative, | 200 WindowMus* relative, |
| 199 ui::mojom::OrderDirection) override; | 201 ui::mojom::OrderDirection) override; |
| 200 void SetBoundsFromServer(const gfx::Rect& bounds) override; | 202 void SetBoundsFromServer(const gfx::Rect& bounds, |
| 203 const cc::LocalFrameId& local_frame_id) override; |
| 201 void SetVisibleFromServer(bool visible) override; | 204 void SetVisibleFromServer(bool visible) override; |
| 202 void SetOpacityFromServer(float opacity) override; | 205 void SetOpacityFromServer(float opacity) override; |
| 203 void SetPredefinedCursorFromServer(ui::mojom::Cursor cursor) override; | 206 void SetPredefinedCursorFromServer(ui::mojom::Cursor cursor) override; |
| 204 void SetPropertyFromServer( | 207 void SetPropertyFromServer( |
| 205 const std::string& property_name, | 208 const std::string& property_name, |
| 206 const std::vector<uint8_t>* property_data) override; | 209 const std::vector<uint8_t>* property_data) override; |
| 207 void SetSurfaceInfoFromServer(const cc::SurfaceInfo& surface_info) override; | 210 void SetSurfaceInfoFromServer(const cc::SurfaceInfo& surface_info) override; |
| 211 void SetLocalFrameIdFromServer( |
| 212 const cc::LocalFrameId& local_frame_id) override; |
| 208 void DestroyFromServer() override; | 213 void DestroyFromServer() override; |
| 209 void AddTransientChildFromServer(WindowMus* child) override; | 214 void AddTransientChildFromServer(WindowMus* child) override; |
| 210 void RemoveTransientChildFromServer(WindowMus* child) override; | 215 void RemoveTransientChildFromServer(WindowMus* child) override; |
| 211 ChangeSource OnTransientChildAdded(WindowMus* child) override; | 216 ChangeSource OnTransientChildAdded(WindowMus* child) override; |
| 212 ChangeSource OnTransientChildRemoved(WindowMus* child) override; | 217 ChangeSource OnTransientChildRemoved(WindowMus* child) override; |
| 213 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange( | 218 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange( |
| 214 const gfx::Rect& bounds) override; | 219 const gfx::Rect& bounds) override; |
| 215 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange( | 220 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange( |
| 216 bool value) override; | 221 bool value) override; |
| 217 void PrepareForDestroy() override; | 222 void PrepareForDestroy() override; |
| 218 void PrepareForTransientRestack(WindowMus* window) override; | 223 void PrepareForTransientRestack(WindowMus* window) override; |
| 219 void OnTransientRestackDone(WindowMus* window) override; | 224 void OnTransientRestackDone(WindowMus* window) override; |
| 220 void NotifyEmbeddedAppDisconnected() override; | 225 void NotifyEmbeddedAppDisconnected() override; |
| 221 | 226 |
| 222 // WindowPort: | 227 // WindowPort: |
| 223 void OnPreInit(Window* window) override; | 228 void OnPreInit(Window* window, ui::LayerType layer_type) override; |
| 224 void OnDeviceScaleFactorChanged(float device_scale_factor) override; | 229 void OnDeviceScaleFactorChanged(float device_scale_factor) override; |
| 225 void OnWillAddChild(Window* child) override; | 230 void OnWillAddChild(Window* child) override; |
| 226 void OnWillRemoveChild(Window* child) override; | 231 void OnWillRemoveChild(Window* child) override; |
| 227 void OnWillMoveChild(size_t current_index, size_t dest_index) override; | 232 void OnWillMoveChild(size_t current_index, size_t dest_index) override; |
| 228 void OnVisibilityChanged(bool visible) override; | 233 void OnVisibilityChanged(bool visible) override; |
| 229 void OnDidChangeBounds(const gfx::Rect& old_bounds, | 234 void OnDidChangeBounds(const gfx::Rect& old_bounds, |
| 230 const gfx::Rect& new_bounds) override; | 235 const gfx::Rect& new_bounds) override; |
| 231 std::unique_ptr<WindowPortPropertyData> OnWillChangeProperty( | 236 std::unique_ptr<WindowPortPropertyData> OnWillChangeProperty( |
| 232 const void* key) override; | 237 const void* key) override; |
| 233 void OnPropertyChanged(const void* key, | 238 void OnPropertyChanged(const void* key, |
| 234 std::unique_ptr<WindowPortPropertyData> data) override; | 239 std::unique_ptr<WindowPortPropertyData> data) override; |
| 235 | 240 |
| 236 WindowTreeClient* window_tree_client_; | 241 WindowTreeClient* window_tree_client_; |
| 237 | 242 |
| 238 Window* window_ = nullptr; | 243 Window* window_ = nullptr; |
| 239 | 244 |
| 240 // Used when this window is embedding a client. | 245 // Used when this window is embedding a client. |
| 241 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder; | 246 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder; |
| 242 | 247 |
| 243 ServerChangeIdType next_server_change_id_ = 0; | 248 ServerChangeIdType next_server_change_id_ = 0; |
| 244 ServerChanges server_changes_; | 249 ServerChanges server_changes_; |
| 245 | 250 |
| 246 cc::SurfaceInfo surface_info_; | 251 cc::SurfaceInfo surface_info_; |
| 252 cc::LocalFrameId current_local_frame_id_; |
| 253 |
| 254 ui::LayerType layer_type_ = ui::LAYER_NOT_DRAWN; |
| 255 |
| 256 base::WeakPtr<ui::WindowCompositorFrameSink> compositor_frame_sink_; |
| 247 | 257 |
| 248 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; | 258 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; |
| 249 | 259 |
| 250 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); | 260 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); |
| 251 }; | 261 }; |
| 252 | 262 |
| 253 } // namespace aura | 263 } // namespace aura |
| 254 | 264 |
| 255 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 265 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
| OLD | NEW |