| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ASH_MUS_WINDOW_MANAGER_H_ | 5 #ifndef ASH_MUS_WINDOW_MANAGER_H_ |
| 6 #define ASH_MUS_WINDOW_MANAGER_H_ | 6 #define ASH_MUS_WINDOW_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "ash/common/wm/wm_toplevel_window_event_handler.h" |
| 13 #include "base/macros.h" | 14 #include "base/macros.h" |
| 14 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 15 #include "components/mus/common/types.h" | 16 #include "components/mus/common/types.h" |
| 16 #include "components/mus/public/cpp/window_manager_delegate.h" | 17 #include "components/mus/public/cpp/window_manager_delegate.h" |
| 17 #include "components/mus/public/cpp/window_observer.h" | 18 #include "components/mus/public/cpp/window_observer.h" |
| 18 #include "components/mus/public/cpp/window_tree_client_delegate.h" | 19 #include "components/mus/public/cpp/window_tree_client_delegate.h" |
| 19 #include "components/mus/public/interfaces/window_manager.mojom.h" | 20 #include "components/mus/public/interfaces/window_manager.mojom.h" |
| 20 | 21 |
| 21 namespace display { | 22 namespace display { |
| 22 class Display; | 23 class Display; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 60 } |
| 60 | 61 |
| 61 shell::Connector* connector() { return connector_; } | 62 shell::Connector* connector() { return connector_; } |
| 62 | 63 |
| 63 void SetScreenLocked(bool is_locked); | 64 void SetScreenLocked(bool is_locked); |
| 64 | 65 |
| 65 // Creates a new top level window. | 66 // Creates a new top level window. |
| 66 ::mus::Window* NewTopLevelWindow( | 67 ::mus::Window* NewTopLevelWindow( |
| 67 std::map<std::string, std::vector<uint8_t>>* properties); | 68 std::map<std::string, std::vector<uint8_t>>* properties); |
| 68 | 69 |
| 70 // Called from WmMoveLoop to delete the object. |
| 71 void OnWmMoveLoopCompleted(uint32_t change_id, |
| 72 uint32_t window_id, |
| 73 bool succeeded); |
| 74 |
| 69 std::set<RootWindowController*> GetRootWindowControllers(); | 75 std::set<RootWindowController*> GetRootWindowControllers(); |
| 70 | 76 |
| 71 void AddRootWindowsObserver(RootWindowsObserver* observer); | 77 void AddRootWindowsObserver(RootWindowsObserver* observer); |
| 72 void RemoveRootWindowsObserver(RootWindowsObserver* observer); | 78 void RemoveRootWindowsObserver(RootWindowsObserver* observer); |
| 73 | 79 |
| 74 private: | 80 private: |
| 75 friend class WmTestHelper; | 81 friend class WmTestHelper; |
| 76 | 82 |
| 77 void AddAccelerators(); | 83 void AddAccelerators(); |
| 78 | 84 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 97 const std::string& name, | 103 const std::string& name, |
| 98 std::unique_ptr<std::vector<uint8_t>>* new_data) override; | 104 std::unique_ptr<std::vector<uint8_t>>* new_data) override; |
| 99 ::mus::Window* OnWmCreateTopLevelWindow( | 105 ::mus::Window* OnWmCreateTopLevelWindow( |
| 100 std::map<std::string, std::vector<uint8_t>>* properties) override; | 106 std::map<std::string, std::vector<uint8_t>>* properties) override; |
| 101 void OnWmClientJankinessChanged( | 107 void OnWmClientJankinessChanged( |
| 102 const std::set<::mus::Window*>& client_windows, | 108 const std::set<::mus::Window*>& client_windows, |
| 103 bool not_responding) override; | 109 bool not_responding) override; |
| 104 void OnWmNewDisplay(::mus::Window* window, | 110 void OnWmNewDisplay(::mus::Window* window, |
| 105 const display::Display& display) override; | 111 const display::Display& display) override; |
| 106 void OnAccelerator(uint32_t id, const ui::Event& event) override; | 112 void OnAccelerator(uint32_t id, const ui::Event& event) override; |
| 113 void OnWmPerformMoveLoop(uint32_t change_id, |
| 114 uint32_t window_id, |
| 115 const gfx::Point& cursor_location) override; |
| 116 void OnWmCancelMoveLoop(uint32_t window_id) override; |
| 107 | 117 |
| 108 // TODO(sky): this is unfortunate, remove. | 118 // TODO(sky): this is unfortunate, remove. |
| 109 WindowManagerApplication* window_manager_app_; | 119 WindowManagerApplication* window_manager_app_; |
| 110 | 120 |
| 111 shell::Connector* connector_; | 121 shell::Connector* connector_; |
| 112 | 122 |
| 113 ::mus::WindowTreeClient* window_tree_client_ = nullptr; | 123 ::mus::WindowTreeClient* window_tree_client_ = nullptr; |
| 114 | 124 |
| 115 ::mus::WindowManagerClient* window_manager_client_ = nullptr; | 125 ::mus::WindowManagerClient* window_manager_client_ = nullptr; |
| 116 | 126 |
| 117 std::unique_ptr<ShadowController> shadow_controller_; | 127 std::unique_ptr<ShadowController> shadow_controller_; |
| 118 | 128 |
| 119 std::set<std::unique_ptr<RootWindowController>> root_window_controllers_; | 129 std::set<std::unique_ptr<RootWindowController>> root_window_controllers_; |
| 120 | 130 |
| 121 base::ObserverList<RootWindowsObserver> root_windows_observers_; | 131 base::ObserverList<RootWindowsObserver> root_windows_observers_; |
| 122 | 132 |
| 123 std::unique_ptr<display::Screen> screen_; | 133 std::unique_ptr<display::Screen> screen_; |
| 124 | 134 |
| 125 std::unique_ptr<WmShellMus> shell_; | 135 std::unique_ptr<WmShellMus> shell_; |
| 126 | 136 |
| 127 std::unique_ptr<WmLookupMus> lookup_; | 137 std::unique_ptr<WmLookupMus> lookup_; |
| 128 | 138 |
| 129 DISALLOW_COPY_AND_ASSIGN(WindowManager); | 139 DISALLOW_COPY_AND_ASSIGN(WindowManager); |
| 130 }; | 140 }; |
| 131 | 141 |
| 132 } // namespace mus | 142 } // namespace mus |
| 133 } // namespace ash | 143 } // namespace ash |
| 134 | 144 |
| 135 #endif // ASH_MUS_WINDOW_MANAGER_H_ | 145 #endif // ASH_MUS_WINDOW_MANAGER_H_ |
| OLD | NEW |