| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ | 5 #ifndef COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ |
| 6 #define COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ | 6 #define COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 bool is_embed_root() const { return is_embed_root_; } | 68 bool is_embed_root() const { return is_embed_root_; } |
| 69 | 69 |
| 70 WindowTreeHostImpl* GetHost() const; | 70 WindowTreeHostImpl* GetHost() const; |
| 71 | 71 |
| 72 // Invoked when a connection is about to be destroyed. | 72 // Invoked when a connection is about to be destroyed. |
| 73 void OnWillDestroyWindowTreeImpl(WindowTreeImpl* connection); | 73 void OnWillDestroyWindowTreeImpl(WindowTreeImpl* connection); |
| 74 | 74 |
| 75 // These functions are synchronous variants of those defined in the mojom. The | 75 // These functions are synchronous variants of those defined in the mojom. The |
| 76 // WindowTree implementations all call into these. See the mojom for details. | 76 // WindowTree implementations all call into these. See the mojom for details. |
| 77 bool NewWindow(const WindowId& window_id); | 77 bool NewWindow(const WindowId& window_id, |
| 78 const std::map<std::string, std::vector<uint8_t>>& properties); |
| 78 bool AddWindow(const WindowId& parent_id, const WindowId& child_id); | 79 bool AddWindow(const WindowId& parent_id, const WindowId& child_id); |
| 79 bool AddTransientWindow(const WindowId& window_id, | 80 bool AddTransientWindow(const WindowId& window_id, |
| 80 const WindowId& transient_window_id); | 81 const WindowId& transient_window_id); |
| 81 std::vector<const ServerWindow*> GetWindowTree( | 82 std::vector<const ServerWindow*> GetWindowTree( |
| 82 const WindowId& window_id) const; | 83 const WindowId& window_id) const; |
| 83 bool SetWindowVisibility(const WindowId& window_id, bool visible); | 84 bool SetWindowVisibility(const WindowId& window_id, bool visible); |
| 84 bool Embed(const WindowId& window_id, | 85 bool Embed(const WindowId& window_id, |
| 85 mojom::WindowTreeClientPtr client, | 86 mojom::WindowTreeClientPtr client, |
| 86 uint32_t policy_bitmask, | 87 uint32_t policy_bitmask, |
| 87 ConnectionSpecificId* connection_id); | 88 ConnectionSpecificId* connection_id); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 184 |
| 184 bool CanEmbed(const WindowId& window_id, uint32_t policy_bitmask) const; | 185 bool CanEmbed(const WindowId& window_id, uint32_t policy_bitmask) const; |
| 185 void PrepareForEmbed(const WindowId& window_id); | 186 void PrepareForEmbed(const WindowId& window_id); |
| 186 void RemoveChildrenAsPartOfEmbed(const WindowId& window_id); | 187 void RemoveChildrenAsPartOfEmbed(const WindowId& window_id); |
| 187 | 188 |
| 188 // Calls OnChangeCompleted() on the client. | 189 // Calls OnChangeCompleted() on the client. |
| 189 void NotifyChangeCompleted(uint32_t change_id, | 190 void NotifyChangeCompleted(uint32_t change_id, |
| 190 mojom::WindowManagerErrorCode error_code); | 191 mojom::WindowManagerErrorCode error_code); |
| 191 | 192 |
| 192 // WindowTree: | 193 // WindowTree: |
| 193 void NewWindow(uint32_t change_id, Id transport_window_id) override; | 194 void NewWindow(uint32_t change_id, |
| 195 Id transport_window_id, |
| 196 mojo::Map<mojo::String, mojo::Array<uint8_t>> |
| 197 transport_properties) override; |
| 194 void DeleteWindow(Id transport_window_id, | 198 void DeleteWindow(Id transport_window_id, |
| 195 const mojo::Callback<void(bool)>& callback) override; | 199 const mojo::Callback<void(bool)>& callback) override; |
| 196 void AddWindow(Id parent_id, | 200 void AddWindow(Id parent_id, |
| 197 Id child_id, | 201 Id child_id, |
| 198 const mojo::Callback<void(bool)>& callback) override; | 202 const mojo::Callback<void(bool)>& callback) override; |
| 199 void RemoveWindowFromParent( | 203 void RemoveWindowFromParent( |
| 200 Id window_id, | 204 Id window_id, |
| 201 const mojo::Callback<void(bool)>& callback) override; | 205 const mojo::Callback<void(bool)>& callback) override; |
| 202 void AddTransientWindow(uint32_t change_id, | 206 void AddTransientWindow(uint32_t change_id, |
| 203 Id window_id, | 207 Id window_id, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 bool is_embed_root_; | 278 bool is_embed_root_; |
| 275 | 279 |
| 276 DISALLOW_COPY_AND_ASSIGN(WindowTreeImpl); | 280 DISALLOW_COPY_AND_ASSIGN(WindowTreeImpl); |
| 277 }; | 281 }; |
| 278 | 282 |
| 279 } // namespace ws | 283 } // namespace ws |
| 280 | 284 |
| 281 } // namespace mus | 285 } // namespace mus |
| 282 | 286 |
| 283 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ | 287 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ |
| OLD | NEW |