| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 void Embed(Id transport_window_id, | 214 void Embed(Id transport_window_id, |
| 214 mojom::WindowTreeClientPtr client, | 215 mojom::WindowTreeClientPtr client, |
| 215 uint32_t policy_bitmask, | 216 uint32_t policy_bitmask, |
| 216 const EmbedCallback& callback) override; | 217 const EmbedCallback& callback) override; |
| 217 void SetFocus(uint32_t window_id) override; | 218 void SetFocus(uint32_t window_id) override; |
| 218 void SetWindowTextInputState(uint32_t window_id, | 219 void SetWindowTextInputState(uint32_t window_id, |
| 219 mojo::TextInputStatePtr state) override; | 220 mojo::TextInputStatePtr state) override; |
| 220 void SetImeVisibility(Id transport_window_id, | 221 void SetImeVisibility(Id transport_window_id, |
| 221 bool visible, | 222 bool visible, |
| 222 mojo::TextInputStatePtr state) override; | 223 mojo::TextInputStatePtr state) override; |
| 223 void SetClientArea(Id transport_window_id, mojo::RectPtr rect) override; | 224 void SetClientArea(Id transport_window_id, mojo::InsetsPtr insets) override; |
| 224 void SetPreferredSize(uint32_t window_id, | 225 void SetPreferredSize(uint32_t window_id, |
| 225 mojo::SizePtr size, | 226 mojo::SizePtr size, |
| 226 const SetPreferredSizeCallback& callback) override; | 227 const SetPreferredSizeCallback& callback) override; |
| 227 void SetShowState(uint32_t window_id, | 228 void SetShowState(uint32_t window_id, |
| 228 mus::mojom::ShowState show_state, | 229 mus::mojom::ShowState show_state, |
| 229 const SetShowStateCallback& callback) override; | 230 const SetShowStateCallback& callback) override; |
| 230 void GetDisplays(const GetDisplaysCallback& callback) override; | |
| 231 | 231 |
| 232 // AccessPolicyDelegate: | 232 // AccessPolicyDelegate: |
| 233 bool IsRootForAccessPolicy(const WindowId& id) const override; | 233 bool IsRootForAccessPolicy(const WindowId& id) const override; |
| 234 bool IsWindowKnownForAccessPolicy(const ServerWindow* window) const override; | 234 bool IsWindowKnownForAccessPolicy(const ServerWindow* window) const override; |
| 235 bool IsWindowRootOfAnotherConnectionForAccessPolicy( | 235 bool IsWindowRootOfAnotherConnectionForAccessPolicy( |
| 236 const ServerWindow* window) const override; | 236 const ServerWindow* window) const override; |
| 237 bool IsDescendantOfEmbedRoot(const ServerWindow* window) override; | 237 bool IsDescendantOfEmbedRoot(const ServerWindow* window) override; |
| 238 | 238 |
| 239 ConnectionManager* connection_manager_; | 239 ConnectionManager* connection_manager_; |
| 240 | 240 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 263 bool is_embed_root_; | 263 bool is_embed_root_; |
| 264 | 264 |
| 265 DISALLOW_COPY_AND_ASSIGN(WindowTreeImpl); | 265 DISALLOW_COPY_AND_ASSIGN(WindowTreeImpl); |
| 266 }; | 266 }; |
| 267 | 267 |
| 268 } // namespace ws | 268 } // namespace ws |
| 269 | 269 |
| 270 } // namespace mus | 270 } // namespace mus |
| 271 | 271 |
| 272 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ | 272 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ |
| OLD | NEW |