| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 namespace mus { | 32 namespace mus { |
| 33 namespace ws { | 33 namespace ws { |
| 34 | 34 |
| 35 class AccessPolicy; | 35 class AccessPolicy; |
| 36 class ConnectionManager; | 36 class ConnectionManager; |
| 37 class ServerWindow; | 37 class ServerWindow; |
| 38 class TargetedEvent; | 38 class TargetedEvent; |
| 39 class WindowTreeHostImpl; | 39 class WindowTreeHostImpl; |
| 40 class WindowTreeTest; | 40 class WindowTreeTest; |
| 41 | 41 |
| 42 namespace test { |
| 43 class WindowTreeTestApi; |
| 44 } |
| 45 |
| 42 // An instance of WindowTreeImpl is created for every WindowTree request. | 46 // An instance of WindowTreeImpl is created for every WindowTree request. |
| 43 // WindowTreeImpl tracks all the state and windows created by a client. | 47 // WindowTreeImpl tracks all the state and windows created by a client. |
| 44 // WindowTreeImpl coordinates with ConnectionManager to update the client (and | 48 // WindowTreeImpl coordinates with ConnectionManager to update the client (and |
| 45 // internal state) as necessary. | 49 // internal state) as necessary. |
| 46 class WindowTreeImpl : public mojom::WindowTree, | 50 class WindowTreeImpl : public mojom::WindowTree, |
| 47 public AccessPolicyDelegate, | 51 public AccessPolicyDelegate, |
| 48 public mojom::WindowManagerClient { | 52 public mojom::WindowManagerClient { |
| 49 public: | 53 public: |
| 50 WindowTreeImpl(ConnectionManager* connection_manager, | 54 WindowTreeImpl(ConnectionManager* connection_manager, |
| 51 ServerWindow* root, | 55 ServerWindow* root, |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 void ProcessLostCapture(const ServerWindow* old_lost_capture, | 178 void ProcessLostCapture(const ServerWindow* old_lost_capture, |
| 175 bool originated_change); | 179 bool originated_change); |
| 176 void ProcessTransientWindowAdded(const ServerWindow* window, | 180 void ProcessTransientWindowAdded(const ServerWindow* window, |
| 177 const ServerWindow* transient_window, | 181 const ServerWindow* transient_window, |
| 178 bool originated_change); | 182 bool originated_change); |
| 179 void ProcessTransientWindowRemoved(const ServerWindow* window, | 183 void ProcessTransientWindowRemoved(const ServerWindow* window, |
| 180 const ServerWindow* transient_window, | 184 const ServerWindow* transient_window, |
| 181 bool originated_change); | 185 bool originated_change); |
| 182 | 186 |
| 183 private: | 187 private: |
| 184 friend class WindowTreeTest; | 188 friend class test::WindowTreeTestApi; |
| 185 | 189 |
| 186 struct WaitingForTopLevelWindowInfo { | 190 struct WaitingForTopLevelWindowInfo { |
| 187 WaitingForTopLevelWindowInfo(const ClientWindowId& client_window_id, | 191 WaitingForTopLevelWindowInfo(const ClientWindowId& client_window_id, |
| 188 uint32_t wm_change_id) | 192 uint32_t wm_change_id) |
| 189 : client_window_id(client_window_id), wm_change_id(wm_change_id) {} | 193 : client_window_id(client_window_id), wm_change_id(wm_change_id) {} |
| 190 ~WaitingForTopLevelWindowInfo() {} | 194 ~WaitingForTopLevelWindowInfo() {} |
| 191 | 195 |
| 192 // Id supplied from the client. | 196 // Id supplied from the client. |
| 193 ClientWindowId client_window_id; | 197 ClientWindowId client_window_id; |
| 194 | 198 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 | 409 |
| 406 scoped_ptr<WaitingForTopLevelWindowInfo> waiting_for_top_level_window_info_; | 410 scoped_ptr<WaitingForTopLevelWindowInfo> waiting_for_top_level_window_info_; |
| 407 | 411 |
| 408 DISALLOW_COPY_AND_ASSIGN(WindowTreeImpl); | 412 DISALLOW_COPY_AND_ASSIGN(WindowTreeImpl); |
| 409 }; | 413 }; |
| 410 | 414 |
| 411 } // namespace ws | 415 } // namespace ws |
| 412 } // namespace mus | 416 } // namespace mus |
| 413 | 417 |
| 414 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ | 418 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_IMPL_H_ |
| OLD | NEW |