| 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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "components/mus/public/interfaces/surface_id.mojom.h" | 16 #include "components/mus/public/interfaces/surface_id.mojom.h" |
| 17 #include "components/mus/public/interfaces/window_tree.mojom.h" | 17 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| 18 #include "components/mus/ws/access_policy_delegate.h" | 18 #include "components/mus/ws/access_policy_delegate.h" |
| 19 #include "components/mus/ws/ids.h" | 19 #include "components/mus/ws/ids.h" |
| 20 | 20 |
| 21 namespace gfx { | 21 namespace gfx { |
| 22 class Insets; |
| 22 class Rect; | 23 class Rect; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace mus { | 26 namespace mus { |
| 26 | 27 |
| 27 namespace ws { | 28 namespace ws { |
| 28 | 29 |
| 29 class AccessPolicy; | 30 class AccessPolicy; |
| 30 class ConnectionManager; | 31 class ConnectionManager; |
| 31 class ServerWindow; | 32 class ServerWindow; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 ConnectionSpecificId* connection_id); | 85 ConnectionSpecificId* connection_id); |
| 85 | 86 |
| 86 // The following methods are invoked after the corresponding change has been | 87 // The following methods are invoked after the corresponding change has been |
| 87 // processed. They do the appropriate bookkeeping and update the client as | 88 // processed. They do the appropriate bookkeeping and update the client as |
| 88 // necessary. | 89 // necessary. |
| 89 void ProcessWindowBoundsChanged(const ServerWindow* window, | 90 void ProcessWindowBoundsChanged(const ServerWindow* window, |
| 90 const gfx::Rect& old_bounds, | 91 const gfx::Rect& old_bounds, |
| 91 const gfx::Rect& new_bounds, | 92 const gfx::Rect& new_bounds, |
| 92 bool originated_change); | 93 bool originated_change); |
| 93 void ProcessClientAreaChanged(const ServerWindow* window, | 94 void ProcessClientAreaChanged(const ServerWindow* window, |
| 94 const gfx::Rect& old_client_area, | 95 const gfx::Insets& old_client_area, |
| 95 const gfx::Rect& new_client_area, | 96 const gfx::Insets& new_client_area, |
| 96 bool originated_change); | 97 bool originated_change); |
| 97 void ProcessViewportMetricsChanged(const mojom::ViewportMetrics& old_metrics, | 98 void ProcessViewportMetricsChanged(const mojom::ViewportMetrics& old_metrics, |
| 98 const mojom::ViewportMetrics& new_metrics, | 99 const mojom::ViewportMetrics& new_metrics, |
| 99 bool originated_change); | 100 bool originated_change); |
| 100 void ProcessWillChangeWindowHierarchy(const ServerWindow* window, | 101 void ProcessWillChangeWindowHierarchy(const ServerWindow* window, |
| 101 const ServerWindow* new_parent, | 102 const ServerWindow* new_parent, |
| 102 const ServerWindow* old_parent, | 103 const ServerWindow* old_parent, |
| 103 bool originated_change); | 104 bool originated_change); |
| 104 void ProcessWindowPropertyChanged(const ServerWindow* window, | 105 void ProcessWindowPropertyChanged(const ServerWindow* window, |
| 105 const std::string& name, | 106 const std::string& name, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 void Embed(Id transport_window_id, | 212 void Embed(Id transport_window_id, |
| 212 mojom::WindowTreeClientPtr client, | 213 mojom::WindowTreeClientPtr client, |
| 213 uint32_t policy_bitmask, | 214 uint32_t policy_bitmask, |
| 214 const EmbedCallback& callback) override; | 215 const EmbedCallback& callback) override; |
| 215 void SetFocus(uint32_t window_id) override; | 216 void SetFocus(uint32_t window_id) override; |
| 216 void SetWindowTextInputState(uint32_t window_id, | 217 void SetWindowTextInputState(uint32_t window_id, |
| 217 mojo::TextInputStatePtr state) override; | 218 mojo::TextInputStatePtr state) override; |
| 218 void SetImeVisibility(Id transport_window_id, | 219 void SetImeVisibility(Id transport_window_id, |
| 219 bool visible, | 220 bool visible, |
| 220 mojo::TextInputStatePtr state) override; | 221 mojo::TextInputStatePtr state) override; |
| 221 void SetClientArea(Id transport_window_id, mojo::RectPtr rect) override; | 222 void SetClientArea(Id transport_window_id, mojo::InsetsPtr insets) override; |
| 222 void SetPreferredSize(uint32_t window_id, | 223 void SetPreferredSize(uint32_t window_id, |
| 223 mojo::SizePtr size, | 224 mojo::SizePtr size, |
| 224 const SetPreferredSizeCallback& callback) override; | 225 const SetPreferredSizeCallback& callback) override; |
| 225 void SetBounds(uint32_t window_id, | 226 void SetBounds(uint32_t window_id, |
| 226 mojo::RectPtr bounds, | 227 mojo::RectPtr bounds, |
| 227 const SetBoundsCallback& callback) override; | 228 const SetBoundsCallback& callback) override; |
| 228 void SetShowState(uint32_t window_id, | 229 void SetShowState(uint32_t window_id, |
| 229 mus::mojom::ShowState show_state, | 230 mus::mojom::ShowState show_state, |
| 230 const SetShowStateCallback& callback) override; | 231 const SetShowStateCallback& callback) override; |
| 231 void GetDisplays(const GetDisplaysCallback& callback) override; | |
| 232 | 232 |
| 233 // AccessPolicyDelegate: | 233 // AccessPolicyDelegate: |
| 234 bool IsRootForAccessPolicy(const WindowId& id) const override; | 234 bool IsRootForAccessPolicy(const WindowId& id) const override; |
| 235 bool IsWindowKnownForAccessPolicy(const ServerWindow* window) const override; | 235 bool IsWindowKnownForAccessPolicy(const ServerWindow* window) const override; |
| 236 bool IsWindowRootOfAnotherConnectionForAccessPolicy( | 236 bool IsWindowRootOfAnotherConnectionForAccessPolicy( |
| 237 const ServerWindow* window) const override; | 237 const ServerWindow* window) const override; |
| 238 bool IsDescendantOfEmbedRoot(const ServerWindow* window) override; | 238 bool IsDescendantOfEmbedRoot(const ServerWindow* window) override; |
| 239 | 239 |
| 240 ConnectionManager* connection_manager_; | 240 ConnectionManager* connection_manager_; |
| 241 | 241 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 264 bool is_embed_root_; | 264 bool is_embed_root_; |
| 265 | 265 |
| 266 DISALLOW_COPY_AND_ASSIGN(WindowTreeImpl); | 266 DISALLOW_COPY_AND_ASSIGN(WindowTreeImpl); |
| 267 }; | 267 }; |
| 268 | 268 |
| 269 } // namespace ws | 269 } // namespace ws |
| 270 | 270 |
| 271 } // namespace mus | 271 } // namespace mus |
| 272 | 272 |
| 273 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ | 273 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ |
| OLD | NEW |