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_AURA_WM_SHELL_AURA_H_ | 5 #ifndef ASH_AURA_WM_SHELL_AURA_H_ |
6 #define ASH_AURA_WM_SHELL_AURA_H_ | 6 #define ASH_AURA_WM_SHELL_AURA_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
12 #include "ash/display/window_tree_host_manager.h" | 12 #include "ash/display/window_tree_host_manager.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 | 17 |
| 18 class AcceleratorControllerDelegateAura; |
18 class PointerWatcherAdapter; | 19 class PointerWatcherAdapter; |
19 | 20 |
20 class ASH_EXPORT WmShellAura : public WmShell, | 21 class ASH_EXPORT WmShellAura : public WmShell, |
21 public WindowTreeHostManager::Observer { | 22 public WindowTreeHostManager::Observer { |
22 public: | 23 public: |
23 WmShellAura(); | 24 WmShellAura(); |
24 ~WmShellAura() override; | 25 ~WmShellAura() override; |
25 | 26 |
26 static WmShellAura* Get(); | 27 static WmShellAura* Get(); |
27 | 28 |
| 29 AcceleratorControllerDelegateAura* accelerator_controller_delegate() { |
| 30 return accelerator_controller_delegate_.get(); |
| 31 } |
28 | 32 |
29 // WmShell: | 33 // WmShell: |
30 void Shutdown() override; | 34 void Shutdown() override; |
31 bool IsRunningInMash() const override; | 35 bool IsRunningInMash() const override; |
32 WmWindow* GetFocusedWindow() override; | 36 WmWindow* GetFocusedWindow() override; |
33 WmWindow* GetActiveWindow() override; | 37 WmWindow* GetActiveWindow() override; |
34 WmWindow* GetCaptureWindow() override; | 38 WmWindow* GetCaptureWindow() override; |
35 WmWindow* GetPrimaryRootWindow() override; | 39 WmWindow* GetPrimaryRootWindow() override; |
36 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; | 40 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; |
37 const display::ManagedDisplayInfo& GetDisplayInfo( | 41 const display::ManagedDisplayInfo& GetDisplayInfo( |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 void AddPointerWatcher(views::PointerWatcher* watcher, | 75 void AddPointerWatcher(views::PointerWatcher* watcher, |
72 views::PointerWatcherEventTypes events) override; | 76 views::PointerWatcherEventTypes events) override; |
73 void RemovePointerWatcher(views::PointerWatcher* watcher) override; | 77 void RemovePointerWatcher(views::PointerWatcher* watcher) override; |
74 bool IsTouchDown() override; | 78 bool IsTouchDown() override; |
75 void ToggleIgnoreExternalKeyboard() override; | 79 void ToggleIgnoreExternalKeyboard() override; |
76 void SetLaserPointerEnabled(bool enabled) override; | 80 void SetLaserPointerEnabled(bool enabled) override; |
77 void SetPartialMagnifierEnabled(bool enabled) override; | 81 void SetPartialMagnifierEnabled(bool enabled) override; |
78 void CreatePointerWatcherAdapter() override; | 82 void CreatePointerWatcherAdapter() override; |
79 void CreatePrimaryHost() override; | 83 void CreatePrimaryHost() override; |
80 void InitHosts(const ShellInitParams& init_params) override; | 84 void InitHosts(const ShellInitParams& init_params) override; |
| 85 std::unique_ptr<AcceleratorController> CreateAcceleratorController() override; |
81 | 86 |
82 private: | 87 private: |
83 // SessionStateObserver: | 88 // SessionStateObserver: |
84 void SessionStateChanged(session_manager::SessionState state) override; | 89 void SessionStateChanged(session_manager::SessionState state) override; |
85 | 90 |
86 // WindowTreeHostManager::Observer: | 91 // WindowTreeHostManager::Observer: |
87 void OnDisplayConfigurationChanging() override; | 92 void OnDisplayConfigurationChanging() override; |
88 void OnDisplayConfigurationChanged() override; | 93 void OnDisplayConfigurationChanged() override; |
89 | 94 |
90 std::unique_ptr<PointerWatcherAdapter> pointer_watcher_adapter_; | 95 std::unique_ptr<PointerWatcherAdapter> pointer_watcher_adapter_; |
91 | 96 |
92 bool added_display_observer_ = false; | 97 bool added_display_observer_ = false; |
93 base::ObserverList<WmDisplayObserver> display_observers_; | 98 base::ObserverList<WmDisplayObserver> display_observers_; |
94 | 99 |
| 100 std::unique_ptr<AcceleratorControllerDelegateAura> |
| 101 accelerator_controller_delegate_; |
| 102 |
95 DISALLOW_COPY_AND_ASSIGN(WmShellAura); | 103 DISALLOW_COPY_AND_ASSIGN(WmShellAura); |
96 }; | 104 }; |
97 | 105 |
98 } // namespace ash | 106 } // namespace ash |
99 | 107 |
100 #endif // ASH_AURA_WM_SHELL_AURA_H_ | 108 #endif // ASH_AURA_WM_SHELL_AURA_H_ |
OLD | NEW |