| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // Returns the current location of the mouse on screen. Note: this method may | 148 // Returns the current location of the mouse on screen. Note: this method may |
| 149 // race the asynchronous initialization; but in that case we return (0, 0). | 149 // race the asynchronous initialization; but in that case we return (0, 0). |
| 150 gfx::Point GetCursorScreenPoint(); | 150 gfx::Point GetCursorScreenPoint(); |
| 151 | 151 |
| 152 // See description in window_tree.mojom. When an existing pointer watcher is | 152 // See description in window_tree.mojom. When an existing pointer watcher is |
| 153 // updated or cleared then any future events from the server for that watcher | 153 // updated or cleared then any future events from the server for that watcher |
| 154 // will be ignored. | 154 // will be ignored. |
| 155 void StartPointerWatcher(bool want_moves); | 155 void StartPointerWatcher(bool want_moves); |
| 156 void StopPointerWatcher(); | 156 void StopPointerWatcher(); |
| 157 | 157 |
| 158 // Performs a window move. |callback| will be asynchronously called with the | |
| 159 // whether the move loop completed successfully. | |
| 160 void PerformWindowMove(Window* window, | |
| 161 ui::mojom::MoveLoopSource source, | |
| 162 const gfx::Point& cursor_location, | |
| 163 const base::Callback<void(bool)>& callback); | |
| 164 | |
| 165 // Cancels a in progress window move. (If no window is currently being moved, | |
| 166 // does nothing.) | |
| 167 void CancelWindowMove(Window* window); | |
| 168 | |
| 169 void AddObserver(WindowTreeClientObserver* observer); | 158 void AddObserver(WindowTreeClientObserver* observer); |
| 170 void RemoveObserver(WindowTreeClientObserver* observer); | 159 void RemoveObserver(WindowTreeClientObserver* observer); |
| 171 | 160 |
| 172 void AddTestObserver(WindowTreeClientTestObserver* observer); | 161 void AddTestObserver(WindowTreeClientTestObserver* observer); |
| 173 void RemoveTestObserver(WindowTreeClientTestObserver* observer); | 162 void RemoveTestObserver(WindowTreeClientTestObserver* observer); |
| 174 | 163 |
| 175 private: | 164 private: |
| 176 friend class InFlightBoundsChange; | 165 friend class InFlightBoundsChange; |
| 177 friend class InFlightFocusChange; | 166 friend class InFlightFocusChange; |
| 178 friend class InFlightPropertyChange; | 167 friend class InFlightPropertyChange; |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 const gfx::Insets& client_area, | 428 const gfx::Insets& client_area, |
| 440 const std::vector<gfx::Rect>& additional_client_areas) override; | 429 const std::vector<gfx::Rect>& additional_client_areas) override; |
| 441 void OnWindowTreeHostHitTestMaskWillChange( | 430 void OnWindowTreeHostHitTestMaskWillChange( |
| 442 WindowTreeHostMus* window_tree_host, | 431 WindowTreeHostMus* window_tree_host, |
| 443 const base::Optional<gfx::Rect>& mask_rect) override; | 432 const base::Optional<gfx::Rect>& mask_rect) override; |
| 444 void OnWindowTreeHostDeactivateWindow( | 433 void OnWindowTreeHostDeactivateWindow( |
| 445 WindowTreeHostMus* window_tree_host) override; | 434 WindowTreeHostMus* window_tree_host) override; |
| 446 void OnWindowTreeHostStackAbove(WindowTreeHostMus* window_tree_host, | 435 void OnWindowTreeHostStackAbove(WindowTreeHostMus* window_tree_host, |
| 447 Window* window) override; | 436 Window* window) override; |
| 448 void OnWindowTreeHostStackAtTop(WindowTreeHostMus* window_tree_host) override; | 437 void OnWindowTreeHostStackAtTop(WindowTreeHostMus* window_tree_host) override; |
| 438 void OnWindowTreeHostPerformWindowMove( |
| 439 WindowTreeHostMus* window_tree_host, |
| 440 ui::mojom::MoveLoopSource mus_source, |
| 441 const gfx::Point& cursor_location, |
| 442 const base::Callback<void(bool)>& callback) override; |
| 443 void OnWindowTreeHostCancelWindowMove( |
| 444 WindowTreeHostMus* window_tree_host) override; |
| 449 std::unique_ptr<WindowPortMus> CreateWindowPortForTopLevel( | 445 std::unique_ptr<WindowPortMus> CreateWindowPortForTopLevel( |
| 450 const std::map<std::string, std::vector<uint8_t>>* properties) override; | 446 const std::map<std::string, std::vector<uint8_t>>* properties) override; |
| 451 void OnWindowTreeHostCreated(WindowTreeHostMus* window_tree_host) override; | 447 void OnWindowTreeHostCreated(WindowTreeHostMus* window_tree_host) override; |
| 452 | 448 |
| 453 // Override from client::TransientWindowClientObserver: | 449 // Override from client::TransientWindowClientObserver: |
| 454 void OnTransientChildWindowAdded(Window* parent, | 450 void OnTransientChildWindowAdded(Window* parent, |
| 455 Window* transient_child) override; | 451 Window* transient_child) override; |
| 456 void OnTransientChildWindowRemoved(Window* parent, | 452 void OnTransientChildWindowRemoved(Window* parent, |
| 457 Window* transient_child) override; | 453 Window* transient_child) override; |
| 458 void OnWillRestackTransientChildAbove(Window* parent, | 454 void OnWillRestackTransientChildAbove(Window* parent, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 std::unique_ptr<ui::Gpu> gpu_; | 540 std::unique_ptr<ui::Gpu> gpu_; |
| 545 std::unique_ptr<MusContextFactory> compositor_context_factory_; | 541 std::unique_ptr<MusContextFactory> compositor_context_factory_; |
| 546 base::WeakPtrFactory<WindowTreeClient> weak_factory_; | 542 base::WeakPtrFactory<WindowTreeClient> weak_factory_; |
| 547 | 543 |
| 548 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); | 544 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); |
| 549 }; | 545 }; |
| 550 | 546 |
| 551 } // namespace aura | 547 } // namespace aura |
| 552 | 548 |
| 553 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ | 549 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ |
| OLD | NEW |