| 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_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ |
| 6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 private: | 116 private: |
| 117 friend class WindowTreeClientImplPrivate; | 117 friend class WindowTreeClientImplPrivate; |
| 118 | 118 |
| 119 enum class NewWindowType { | 119 enum class NewWindowType { |
| 120 CHILD, | 120 CHILD, |
| 121 TOP_LEVEL, | 121 TOP_LEVEL, |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 using IdToWindowMap = std::map<Id, Window*>; | 124 using IdToWindowMap = std::map<Id, Window*>; |
| 125 | 125 |
| 126 // TODO(sky): this assumes change_ids never wrap, which is a bad assumption. |
| 126 using InFlightMap = std::map<uint32_t, scoped_ptr<InFlightChange>>; | 127 using InFlightMap = std::map<uint32_t, scoped_ptr<InFlightChange>>; |
| 127 | 128 |
| 128 // Returns the oldest InFlightChange that matches |change|. | 129 // Returns the oldest InFlightChange that matches |change|. |
| 129 InFlightChange* GetOldestInFlightChangeMatching(const InFlightChange& change); | 130 InFlightChange* GetOldestInFlightChangeMatching(const InFlightChange& change); |
| 130 | 131 |
| 131 // See InFlightChange for details on how InFlightChanges are used. | 132 // See InFlightChange for details on how InFlightChanges are used. |
| 132 uint32_t ScheduleInFlightChange(scoped_ptr<InFlightChange> change); | 133 uint32_t ScheduleInFlightChange(scoped_ptr<InFlightChange> change); |
| 133 | 134 |
| 134 // Returns true if there is an InFlightChange that matches |change|. If there | 135 // Returns true if there is an InFlightChange that matches |change|. If there |
| 135 // is an existing change SetRevertValueFrom() is invoked on it. Returns false | 136 // is an existing change SetRevertValueFrom() is invoked on it. Returns false |
| (...skipping 25 matching lines...) Expand all Loading... |
| 161 void RemoveObserver(WindowTreeConnectionObserver* observer) override; | 162 void RemoveObserver(WindowTreeConnectionObserver* observer) override; |
| 162 | 163 |
| 163 // Overridden from WindowTreeClient: | 164 // Overridden from WindowTreeClient: |
| 164 void OnEmbed(ConnectionSpecificId connection_id, | 165 void OnEmbed(ConnectionSpecificId connection_id, |
| 165 mojom::WindowDataPtr root, | 166 mojom::WindowDataPtr root, |
| 166 mojom::WindowTreePtr tree, | 167 mojom::WindowTreePtr tree, |
| 167 Id focused_window_id, | 168 Id focused_window_id, |
| 168 uint32_t access_policy) override; | 169 uint32_t access_policy) override; |
| 169 void OnEmbeddedAppDisconnected(Id window_id) override; | 170 void OnEmbeddedAppDisconnected(Id window_id) override; |
| 170 void OnUnembed(Id window_id) override; | 171 void OnUnembed(Id window_id) override; |
| 172 void OnTopLevelCreated(uint32_t change_id, |
| 173 mojom::WindowDataPtr data) override; |
| 171 void OnWindowBoundsChanged(Id window_id, | 174 void OnWindowBoundsChanged(Id window_id, |
| 172 mojo::RectPtr old_bounds, | 175 mojo::RectPtr old_bounds, |
| 173 mojo::RectPtr new_bounds) override; | 176 mojo::RectPtr new_bounds) override; |
| 174 void OnClientAreaChanged( | 177 void OnClientAreaChanged( |
| 175 uint32_t window_id, | 178 uint32_t window_id, |
| 176 mojo::InsetsPtr new_client_area, | 179 mojo::InsetsPtr new_client_area, |
| 177 mojo::Array<mojo::RectPtr> new_additional_client_areas) override; | 180 mojo::Array<mojo::RectPtr> new_additional_client_areas) override; |
| 178 void OnTransientWindowAdded(uint32_t window_id, | 181 void OnTransientWindowAdded(uint32_t window_id, |
| 179 uint32_t transient_window_id) override; | 182 uint32_t transient_window_id) override; |
| 180 void OnTransientWindowRemoved(uint32_t window_id, | 183 void OnTransientWindowRemoved(uint32_t window_id, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 window_manager_internal_; | 263 window_manager_internal_; |
| 261 mojom::WindowManagerInternalClientAssociatedPtr | 264 mojom::WindowManagerInternalClientAssociatedPtr |
| 262 window_manager_internal_client_; | 265 window_manager_internal_client_; |
| 263 | 266 |
| 264 MOJO_DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); | 267 MOJO_DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); |
| 265 }; | 268 }; |
| 266 | 269 |
| 267 } // namespace mus | 270 } // namespace mus |
| 268 | 271 |
| 269 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ | 272 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ |
| OLD | NEW |