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/aura/wm_lookup_aura.h" | 11 #include "ash/aura/wm_lookup_aura.h" |
12 #include "ash/common/wm_shell.h" | 12 #include "ash/common/wm_shell.h" |
13 #include "ash/display/window_tree_host_manager.h" | 13 #include "ash/display/window_tree_host_manager.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "ui/wm/public/activation_change_observer.h" | 16 #include "ui/wm/public/activation_change_observer.h" |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 | 19 |
20 class ASH_EXPORT WmShellAura : public WmShell, | 20 class ASH_EXPORT WmShellAura : public WmShell, |
21 public aura::client::ActivationChangeObserver, | 21 public aura::client::ActivationChangeObserver, |
22 public WindowTreeHostManager::Observer { | 22 public WindowTreeHostManager::Observer { |
23 public: | 23 public: |
24 explicit WmShellAura(std::unique_ptr<ShellDelegate> shell_delegate); | 24 explicit WmShellAura(std::unique_ptr<ShellDelegate> shell_delegate); |
25 ~WmShellAura() override; | 25 ~WmShellAura() override; |
26 | 26 |
27 static WmShellAura* Get(); | 27 static WmShellAura* Get(); |
28 | 28 |
29 // Called early in shutdown sequence. | |
30 void PrepareForShutdown(); | |
31 | |
32 // WmShell: | 29 // WmShell: |
| 30 void Shutdown() override; |
33 WmWindow* NewContainerWindow() override; | 31 WmWindow* NewContainerWindow() override; |
34 WmWindow* GetFocusedWindow() override; | 32 WmWindow* GetFocusedWindow() override; |
35 WmWindow* GetActiveWindow() override; | 33 WmWindow* GetActiveWindow() override; |
36 WmWindow* GetPrimaryRootWindow() override; | 34 WmWindow* GetPrimaryRootWindow() override; |
37 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; | 35 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; |
38 WmWindow* GetRootWindowForNewWindows() override; | 36 WmWindow* GetRootWindowForNewWindows() override; |
39 const DisplayInfo& GetDisplayInfo(int64_t display_id) const override; | 37 const DisplayInfo& GetDisplayInfo(int64_t display_id) const override; |
40 bool IsActiveDisplayId(int64_t display_id) const override; | 38 bool IsActiveDisplayId(int64_t display_id) const override; |
41 bool IsForceMaximizeOnFirstRun() override; | 39 bool IsForceMaximizeOnFirstRun() override; |
42 bool IsPinned() override; | 40 bool IsPinned() override; |
43 void SetPinnedWindow(WmWindow* window) override; | 41 void SetPinnedWindow(WmWindow* window) override; |
44 bool CanShowWindowForUser(WmWindow* window) override; | 42 bool CanShowWindowForUser(WmWindow* window) override; |
45 void LockCursor() override; | 43 void LockCursor() override; |
46 void UnlockCursor() override; | 44 void UnlockCursor() override; |
47 std::vector<WmWindow*> GetAllRootWindows() override; | 45 std::vector<WmWindow*> GetAllRootWindows() override; |
48 void RecordUserMetricsAction(UserMetricsAction action) override; | 46 void RecordUserMetricsAction(UserMetricsAction action) override; |
49 std::unique_ptr<WindowResizer> CreateDragWindowResizer( | 47 std::unique_ptr<WindowResizer> CreateDragWindowResizer( |
50 std::unique_ptr<WindowResizer> next_window_resizer, | 48 std::unique_ptr<WindowResizer> next_window_resizer, |
51 wm::WindowState* window_state) override; | 49 wm::WindowState* window_state) override; |
52 std::unique_ptr<wm::MaximizeModeEventHandler> CreateMaximizeModeEventHandler() | 50 std::unique_ptr<wm::MaximizeModeEventHandler> CreateMaximizeModeEventHandler() |
53 override; | 51 override; |
54 std::unique_ptr<ScopedDisableInternalMouseAndKeyboard> | 52 std::unique_ptr<ScopedDisableInternalMouseAndKeyboard> |
55 CreateScopedDisableInternalMouseAndKeyboard() override; | 53 CreateScopedDisableInternalMouseAndKeyboard() override; |
56 void OnOverviewModeStarting() override; | 54 void OnOverviewModeStarting() override; |
57 void OnOverviewModeEnded() override; | 55 void OnOverviewModeEnded() override; |
58 AccessibilityDelegate* GetAccessibilityDelegate() override; | |
59 SessionStateDelegate* GetSessionStateDelegate() override; | 56 SessionStateDelegate* GetSessionStateDelegate() override; |
60 void AddActivationObserver(WmActivationObserver* observer) override; | 57 void AddActivationObserver(WmActivationObserver* observer) override; |
61 void RemoveActivationObserver(WmActivationObserver* observer) override; | 58 void RemoveActivationObserver(WmActivationObserver* observer) override; |
62 void AddDisplayObserver(WmDisplayObserver* observer) override; | 59 void AddDisplayObserver(WmDisplayObserver* observer) override; |
63 void RemoveDisplayObserver(WmDisplayObserver* observer) override; | 60 void RemoveDisplayObserver(WmDisplayObserver* observer) override; |
64 void AddPointerWatcher(views::PointerWatcher* watcher) override; | 61 void AddPointerWatcher(views::PointerWatcher* watcher) override; |
65 void RemovePointerWatcher(views::PointerWatcher* watcher) override; | 62 void RemovePointerWatcher(views::PointerWatcher* watcher) override; |
66 #if defined(OS_CHROMEOS) | 63 #if defined(OS_CHROMEOS) |
67 void ToggleIgnoreExternalKeyboard() override; | 64 void ToggleIgnoreExternalKeyboard() override; |
68 #endif | 65 #endif |
(...skipping 16 matching lines...) Expand all Loading... |
85 | 82 |
86 bool added_display_observer_ = false; | 83 bool added_display_observer_ = false; |
87 base::ObserverList<WmDisplayObserver> display_observers_; | 84 base::ObserverList<WmDisplayObserver> display_observers_; |
88 | 85 |
89 DISALLOW_COPY_AND_ASSIGN(WmShellAura); | 86 DISALLOW_COPY_AND_ASSIGN(WmShellAura); |
90 }; | 87 }; |
91 | 88 |
92 } // namespace ash | 89 } // namespace ash |
93 | 90 |
94 #endif // ASH_AURA_WM_SHELL_AURA_H_ | 91 #endif // ASH_AURA_WM_SHELL_AURA_H_ |
OLD | NEW |