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 UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ | 5 #ifndef UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ |
6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ | 6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // OnEmbed() calls into this. Exposed as a separate function for testing. | 260 // OnEmbed() calls into this. Exposed as a separate function for testing. |
261 void OnEmbedImpl(ui::mojom::WindowTree* window_tree, | 261 void OnEmbedImpl(ui::mojom::WindowTree* window_tree, |
262 ClientSpecificId client_id, | 262 ClientSpecificId client_id, |
263 ui::mojom::WindowDataPtr root_data, | 263 ui::mojom::WindowDataPtr root_data, |
264 int64_t display_id, | 264 int64_t display_id, |
265 Id focused_window_id, | 265 Id focused_window_id, |
266 bool drawn, | 266 bool drawn, |
267 const cc::FrameSinkId& frame_sink_id, | 267 const cc::FrameSinkId& frame_sink_id, |
268 const base::Optional<cc::LocalSurfaceId>& local_surface_id); | 268 const base::Optional<cc::LocalSurfaceId>& local_surface_id); |
269 | 269 |
| 270 // Called once mus acks a call to SetDisplayRoot(). |
| 271 void OnSetDisplayRootDone( |
| 272 Id window_id, |
| 273 const base::Optional<cc::FrameSinkId>& frame_sink_id); |
| 274 |
270 // Called by WmNewDisplayAdded(). | 275 // Called by WmNewDisplayAdded(). |
271 WindowTreeHostMus* WmNewDisplayAddedImpl( | 276 WindowTreeHostMus* WmNewDisplayAddedImpl( |
272 const display::Display& display, | 277 const display::Display& display, |
273 ui::mojom::WindowDataPtr root_data, | 278 ui::mojom::WindowDataPtr root_data, |
274 bool parent_drawn, | 279 bool parent_drawn, |
275 const cc::FrameSinkId& frame_sink_id, | 280 const cc::FrameSinkId& frame_sink_id, |
276 const base::Optional<cc::LocalSurfaceId>& local_surface_id); | 281 const base::Optional<cc::LocalSurfaceId>& local_surface_id); |
277 | 282 |
278 std::unique_ptr<EventResultCallback> CreateEventResultCallback( | 283 std::unique_ptr<EventResultCallback> CreateEventResultCallback( |
279 int32_t event_id); | 284 int32_t event_id); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 void OnWmMoveLoopCompleted(uint32_t change_id, bool completed); | 322 void OnWmMoveLoopCompleted(uint32_t change_id, bool completed); |
318 | 323 |
319 // Overridden from WindowTreeClient: | 324 // Overridden from WindowTreeClient: |
320 void OnEmbed( | 325 void OnEmbed( |
321 ClientSpecificId client_id, | 326 ClientSpecificId client_id, |
322 ui::mojom::WindowDataPtr root, | 327 ui::mojom::WindowDataPtr root, |
323 ui::mojom::WindowTreePtr tree, | 328 ui::mojom::WindowTreePtr tree, |
324 int64_t display_id, | 329 int64_t display_id, |
325 Id focused_window_id, | 330 Id focused_window_id, |
326 bool drawn, | 331 bool drawn, |
327 const cc::FrameSinkId& frame_sink_Id, | 332 const cc::FrameSinkId& frame_sink_id, |
328 const base::Optional<cc::LocalSurfaceId>& local_surface_id) override; | 333 const base::Optional<cc::LocalSurfaceId>& local_surface_id) override; |
329 void OnEmbeddedAppDisconnected(Id window_id) override; | 334 void OnEmbeddedAppDisconnected(Id window_id) override; |
330 void OnUnembed(Id window_id) override; | 335 void OnUnembed(Id window_id) override; |
331 void OnCaptureChanged(Id new_capture_window_id, | 336 void OnCaptureChanged(Id new_capture_window_id, |
332 Id old_capture_window_id) override; | 337 Id old_capture_window_id) override; |
333 void OnFrameSinkIdAllocated(Id window_id, | 338 void OnFrameSinkIdAllocated(Id window_id, |
334 const cc::FrameSinkId& frame_sink_id) override; | 339 const cc::FrameSinkId& frame_sink_id) override; |
335 void OnTopLevelCreated( | 340 void OnTopLevelCreated( |
336 uint32_t change_id, | 341 uint32_t change_id, |
337 ui::mojom::WindowDataPtr data, | 342 ui::mojom::WindowDataPtr data, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 ui::mojom::CursorType cursor_id) override; | 469 ui::mojom::CursorType cursor_id) override; |
465 void AddAccelerators(std::vector<ui::mojom::WmAcceleratorPtr> accelerators, | 470 void AddAccelerators(std::vector<ui::mojom::WmAcceleratorPtr> accelerators, |
466 const base::Callback<void(bool)>& callback) override; | 471 const base::Callback<void(bool)>& callback) override; |
467 void RemoveAccelerator(uint32_t id) override; | 472 void RemoveAccelerator(uint32_t id) override; |
468 void AddActivationParent(Window* window) override; | 473 void AddActivationParent(Window* window) override; |
469 void RemoveActivationParent(Window* window) override; | 474 void RemoveActivationParent(Window* window) override; |
470 void ActivateNextWindow() override; | 475 void ActivateNextWindow() override; |
471 void SetExtendedHitArea(Window* window, const gfx::Insets& hit_area) override; | 476 void SetExtendedHitArea(Window* window, const gfx::Insets& hit_area) override; |
472 void RequestClose(Window* window) override; | 477 void RequestClose(Window* window) override; |
473 bool WaitForInitialDisplays() override; | 478 bool WaitForInitialDisplays() override; |
| 479 WindowTreeHostMusInitParams CreateInitParamsForNewDisplay() override; |
474 | 480 |
475 // Overriden from WindowTreeHostMusDelegate: | 481 // Overriden from WindowTreeHostMusDelegate: |
476 void OnWindowTreeHostBoundsWillChange(WindowTreeHostMus* window_tree_host, | 482 void OnWindowTreeHostBoundsWillChange(WindowTreeHostMus* window_tree_host, |
477 const gfx::Rect& bounds) override; | 483 const gfx::Rect& bounds) override; |
478 void OnWindowTreeHostClientAreaWillChange( | 484 void OnWindowTreeHostClientAreaWillChange( |
479 WindowTreeHostMus* window_tree_host, | 485 WindowTreeHostMus* window_tree_host, |
480 const gfx::Insets& client_area, | 486 const gfx::Insets& client_area, |
481 const std::vector<gfx::Rect>& additional_client_areas) override; | 487 const std::vector<gfx::Rect>& additional_client_areas) override; |
482 void OnWindowTreeHostHitTestMaskWillChange( | 488 void OnWindowTreeHostHitTestMaskWillChange( |
483 WindowTreeHostMus* window_tree_host, | 489 WindowTreeHostMus* window_tree_host, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 gfx::Insets normal_client_area_insets_; | 618 gfx::Insets normal_client_area_insets_; |
613 | 619 |
614 base::WeakPtrFactory<WindowTreeClient> weak_factory_; | 620 base::WeakPtrFactory<WindowTreeClient> weak_factory_; |
615 | 621 |
616 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); | 622 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); |
617 }; | 623 }; |
618 | 624 |
619 } // namespace aura | 625 } // namespace aura |
620 | 626 |
621 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ | 627 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ |
OLD | NEW |