| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BRIDGE_WM_SHELL_MUS_H_ | 5 #ifndef ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ |
| 6 #define ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ | 6 #define ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class WindowTreeClient; | 23 class WindowTreeClient; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace ash { | 26 namespace ash { |
| 27 namespace mus { | 27 namespace mus { |
| 28 | 28 |
| 29 class AcceleratorControllerDelegateMus; | 29 class AcceleratorControllerDelegateMus; |
| 30 class AcceleratorControllerRegistrar; | 30 class AcceleratorControllerRegistrar; |
| 31 class WindowManager; | 31 class WindowManager; |
| 32 class WmRootWindowControllerMus; | 32 class WmRootWindowControllerMus; |
| 33 class WmShellMusTestApi; |
| 33 class WmWindowMus; | 34 class WmWindowMus; |
| 34 | 35 |
| 35 // WmShell implementation for mus. | 36 // WmShell implementation for mus. |
| 36 class WmShellMus : public WmShell, public ui::WindowTreeClientObserver { | 37 class WmShellMus : public WmShell, public ui::WindowTreeClientObserver { |
| 37 public: | 38 public: |
| 38 WmShellMus(std::unique_ptr<ShellDelegate> shell_delegate, | 39 WmShellMus(std::unique_ptr<ShellDelegate> shell_delegate, |
| 39 WindowManager* window_manager); | 40 WindowManager* window_manager); |
| 40 ~WmShellMus() override; | 41 ~WmShellMus() override; |
| 41 | 42 |
| 42 static WmShellMus* Get(); | 43 static WmShellMus* Get(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 void RemoveActivationObserver(WmActivationObserver* observer) override; | 91 void RemoveActivationObserver(WmActivationObserver* observer) override; |
| 91 void AddDisplayObserver(WmDisplayObserver* observer) override; | 92 void AddDisplayObserver(WmDisplayObserver* observer) override; |
| 92 void RemoveDisplayObserver(WmDisplayObserver* observer) override; | 93 void RemoveDisplayObserver(WmDisplayObserver* observer) override; |
| 93 void AddPointerWatcher(views::PointerWatcher* watcher) override; | 94 void AddPointerWatcher(views::PointerWatcher* watcher) override; |
| 94 void RemovePointerWatcher(views::PointerWatcher* watcher) override; | 95 void RemovePointerWatcher(views::PointerWatcher* watcher) override; |
| 95 #if defined(OS_CHROMEOS) | 96 #if defined(OS_CHROMEOS) |
| 96 void ToggleIgnoreExternalKeyboard() override; | 97 void ToggleIgnoreExternalKeyboard() override; |
| 97 #endif | 98 #endif |
| 98 | 99 |
| 99 private: | 100 private: |
| 101 friend class WmShellMusTestApi; |
| 102 |
| 100 ui::WindowTreeClient* window_tree_client(); | 103 ui::WindowTreeClient* window_tree_client(); |
| 101 | 104 |
| 102 // Returns true if |window| is a window that can have active children. | 105 // Returns true if |window| is a window that can have active children. |
| 103 static bool IsActivationParent(ui::Window* window); | 106 static bool IsActivationParent(ui::Window* window); |
| 104 | 107 |
| 105 // ui::WindowTreeClientObserver: | 108 // ui::WindowTreeClientObserver: |
| 106 void OnWindowTreeFocusChanged(ui::Window* gained_focus, | 109 void OnWindowTreeFocusChanged(ui::Window* gained_focus, |
| 107 ui::Window* lost_focus) override; | 110 ui::Window* lost_focus) override; |
| 108 void OnDidDestroyClient(ui::WindowTreeClient* client) override; | 111 void OnDidDestroyClient(ui::WindowTreeClient* client) override; |
| 109 | 112 |
| 110 WindowManager* window_manager_; | 113 WindowManager* window_manager_; |
| 111 | 114 |
| 112 std::vector<WmRootWindowControllerMus*> root_window_controllers_; | 115 std::vector<WmRootWindowControllerMus*> root_window_controllers_; |
| 113 | 116 |
| 114 std::unique_ptr<AcceleratorControllerDelegateMus> | 117 std::unique_ptr<AcceleratorControllerDelegateMus> |
| 115 accelerator_controller_delegate_; | 118 accelerator_controller_delegate_; |
| 116 std::unique_ptr<AcceleratorControllerRegistrar> | 119 std::unique_ptr<AcceleratorControllerRegistrar> |
| 117 accelerator_controller_registrar_; | 120 accelerator_controller_registrar_; |
| 118 std::unique_ptr<SessionStateDelegate> session_state_delegate_; | 121 std::unique_ptr<SessionStateDelegate> session_state_delegate_; |
| 119 | 122 |
| 120 base::ObserverList<WmActivationObserver> activation_observers_; | 123 base::ObserverList<WmActivationObserver> activation_observers_; |
| 121 | 124 |
| 122 DISALLOW_COPY_AND_ASSIGN(WmShellMus); | 125 DISALLOW_COPY_AND_ASSIGN(WmShellMus); |
| 123 }; | 126 }; |
| 124 | 127 |
| 125 } // namespace mus | 128 } // namespace mus |
| 126 } // namespace ash | 129 } // namespace ash |
| 127 | 130 |
| 128 #endif // ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ | 131 #endif // ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ |
| OLD | NEW |