| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // See InFlightChange for details on how InFlightChanges are used. | 160 // See InFlightChange for details on how InFlightChanges are used. |
| 161 bool ApplyServerChangeToExistingInFlightChange(const InFlightChange& change); | 161 bool ApplyServerChangeToExistingInFlightChange(const InFlightChange& change); |
| 162 | 162 |
| 163 Window* NewWindowImpl(NewWindowType type, | 163 Window* NewWindowImpl(NewWindowType type, |
| 164 const Window::SharedProperties* properties); | 164 const Window::SharedProperties* properties); |
| 165 | 165 |
| 166 // OnEmbed() calls into this. Exposed as a separate function for testing. | 166 // OnEmbed() calls into this. Exposed as a separate function for testing. |
| 167 void OnEmbedImpl(mojom::WindowTree* window_tree, | 167 void OnEmbedImpl(mojom::WindowTree* window_tree, |
| 168 ClientSpecificId client_id, | 168 ClientSpecificId client_id, |
| 169 mojom::WindowDataPtr root_data, | 169 mojom::WindowDataPtr root_data, |
| 170 int64_t display_id, |
| 170 Id focused_window_id, | 171 Id focused_window_id, |
| 171 bool drawn); | 172 bool drawn); |
| 172 | 173 |
| 173 void OnReceivedCursorLocationMemory(mojo::ScopedSharedBufferHandle handle); | 174 void OnReceivedCursorLocationMemory(mojo::ScopedSharedBufferHandle handle); |
| 174 | 175 |
| 175 // Overridden from WindowTreeConnection: | 176 // Overridden from WindowTreeConnection: |
| 176 void SetDeleteOnNoRoots(bool value) override; | 177 void SetDeleteOnNoRoots(bool value) override; |
| 177 const std::set<Window*>& GetRoots() override; | 178 const std::set<Window*>& GetRoots() override; |
| 178 Window* GetFocusedWindow() override; | 179 Window* GetFocusedWindow() override; |
| 179 void ClearFocus() override; | 180 void ClearFocus() override; |
| 180 gfx::Point GetCursorScreenPoint() override; | 181 gfx::Point GetCursorScreenPoint() override; |
| 181 void SetEventObserver(mojom::EventMatcherPtr matcher) override; | 182 void SetEventObserver(mojom::EventMatcherPtr matcher) override; |
| 182 Window* NewWindow(const Window::SharedProperties* properties) override; | 183 Window* NewWindow(const Window::SharedProperties* properties) override; |
| 183 Window* NewTopLevelWindow( | 184 Window* NewTopLevelWindow( |
| 184 const Window::SharedProperties* properties) override; | 185 const Window::SharedProperties* properties) override; |
| 185 void AddObserver(WindowTreeConnectionObserver* observer) override; | 186 void AddObserver(WindowTreeConnectionObserver* observer) override; |
| 186 void RemoveObserver(WindowTreeConnectionObserver* observer) override; | 187 void RemoveObserver(WindowTreeConnectionObserver* observer) override; |
| 187 | 188 |
| 188 // Overridden from WindowTreeClient: | 189 // Overridden from WindowTreeClient: |
| 189 void OnEmbed(ClientSpecificId client_id, | 190 void OnEmbed(ClientSpecificId client_id, |
| 190 mojom::WindowDataPtr root, | 191 mojom::WindowDataPtr root, |
| 191 mojom::WindowTreePtr tree, | 192 mojom::WindowTreePtr tree, |
| 193 int64_t display_id, |
| 192 Id focused_window_id, | 194 Id focused_window_id, |
| 193 bool drawn) override; | 195 bool drawn) override; |
| 194 void OnEmbeddedAppDisconnected(Id window_id) override; | 196 void OnEmbeddedAppDisconnected(Id window_id) override; |
| 195 void OnUnembed(Id window_id) override; | 197 void OnUnembed(Id window_id) override; |
| 196 void OnLostCapture(Id window_id) override; | 198 void OnLostCapture(Id window_id) override; |
| 197 void OnTopLevelCreated(uint32_t change_id, | 199 void OnTopLevelCreated(uint32_t change_id, |
| 198 mojom::WindowDataPtr data, | 200 mojom::WindowDataPtr data, |
| 201 int64_t display_id, |
| 199 bool drawn) override; | 202 bool drawn) override; |
| 200 void OnWindowBoundsChanged(Id window_id, | 203 void OnWindowBoundsChanged(Id window_id, |
| 201 mojo::RectPtr old_bounds, | 204 mojo::RectPtr old_bounds, |
| 202 mojo::RectPtr new_bounds) override; | 205 mojo::RectPtr new_bounds) override; |
| 203 void OnClientAreaChanged( | 206 void OnClientAreaChanged( |
| 204 uint32_t window_id, | 207 uint32_t window_id, |
| 205 mojo::InsetsPtr new_client_area, | 208 mojo::InsetsPtr new_client_area, |
| 206 mojo::Array<mojo::RectPtr> new_additional_client_areas) override; | 209 mojo::Array<mojo::RectPtr> new_additional_client_areas) override; |
| 207 void OnTransientWindowAdded(uint32_t window_id, | 210 void OnTransientWindowAdded(uint32_t window_id, |
| 208 uint32_t transient_window_id) override; | 211 uint32_t transient_window_id) override; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 uint32_t event_observer_id_ = 0u; | 329 uint32_t event_observer_id_ = 0u; |
| 327 | 330 |
| 328 base::WeakPtrFactory<WindowTreeClientImpl> weak_factory_; | 331 base::WeakPtrFactory<WindowTreeClientImpl> weak_factory_; |
| 329 | 332 |
| 330 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); | 333 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); |
| 331 }; | 334 }; |
| 332 | 335 |
| 333 } // namespace mus | 336 } // namespace mus |
| 334 | 337 |
| 335 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ | 338 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ |
| OLD | NEW |