| 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_COMMON_WM_SHELL_H_ | 5 #ifndef ASH_COMMON_WM_SHELL_H_ |
| 6 #define ASH_COMMON_WM_SHELL_H_ | 6 #define ASH_COMMON_WM_SHELL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "ash/ash_export.h" | 13 #include "ash/ash_export.h" |
| 14 #include "ash/common/metrics/user_metrics_action.h" |
| 14 | 15 |
| 15 namespace gfx { | 16 namespace gfx { |
| 16 class Rect; | 17 class Rect; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace ash { | 20 namespace ash { |
| 20 | 21 |
| 21 class AccessibilityDelegate; | 22 class AccessibilityDelegate; |
| 22 class MruWindowTracker; | 23 class MruWindowTracker; |
| 23 class SessionStateDelegate; | 24 class SessionStateDelegate; |
| 24 class ShellObserver; | 25 class ShellObserver; |
| 25 class SystemTrayDelegate; | 26 class SystemTrayDelegate; |
| 26 class WindowResizer; | 27 class WindowResizer; |
| 27 class WmActivationObserver; | 28 class WmActivationObserver; |
| 28 class WmDisplayObserver; | 29 class WmDisplayObserver; |
| 29 class WmSystemTrayNotifier; | 30 class WmSystemTrayNotifier; |
| 30 class WmWindow; | 31 class WmWindow; |
| 31 | 32 |
| 32 namespace wm { | 33 namespace wm { |
| 33 | |
| 34 class WindowState; | 34 class WindowState; |
| 35 | |
| 36 enum class WmUserMetricsAction; | |
| 37 } | 35 } |
| 38 | 36 |
| 39 // Similar to ash::Shell. Eventually the two will be merged. | 37 // Similar to ash::Shell. Eventually the two will be merged. |
| 40 class ASH_EXPORT WmShell { | 38 class ASH_EXPORT WmShell { |
| 41 public: | 39 public: |
| 42 // This is necessary for a handful of places that is difficult to plumb | 40 // This is necessary for a handful of places that is difficult to plumb |
| 43 // through context. | 41 // through context. |
| 44 static void Set(WmShell* instance); | 42 static void Set(WmShell* instance); |
| 45 static WmShell* Get(); | 43 static WmShell* Get(); |
| 46 static bool HasInstance() { return instance_ != nullptr; } | 44 static bool HasInstance() { return instance_ != nullptr; } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // TODO(jamescook): Remove this when ShellDelegate is accessible via this | 81 // TODO(jamescook): Remove this when ShellDelegate is accessible via this |
| 84 // interface. | 82 // interface. |
| 85 virtual bool CanShowWindowForUser(WmWindow* window) = 0; | 83 virtual bool CanShowWindowForUser(WmWindow* window) = 0; |
| 86 | 84 |
| 87 // See aura::client::CursorClient for details on these. | 85 // See aura::client::CursorClient for details on these. |
| 88 virtual void LockCursor() = 0; | 86 virtual void LockCursor() = 0; |
| 89 virtual void UnlockCursor() = 0; | 87 virtual void UnlockCursor() = 0; |
| 90 | 88 |
| 91 virtual std::vector<WmWindow*> GetAllRootWindows() = 0; | 89 virtual std::vector<WmWindow*> GetAllRootWindows() = 0; |
| 92 | 90 |
| 93 virtual void RecordUserMetricsAction(wm::WmUserMetricsAction action) = 0; | 91 virtual void RecordUserMetricsAction(UserMetricsAction action) = 0; |
| 94 | 92 |
| 95 // Returns a WindowResizer to handle dragging. |next_window_resizer| is | 93 // Returns a WindowResizer to handle dragging. |next_window_resizer| is |
| 96 // the next WindowResizer in the WindowResizer chain. This may return | 94 // the next WindowResizer in the WindowResizer chain. This may return |
| 97 // |next_window_resizer|. | 95 // |next_window_resizer|. |
| 98 virtual std::unique_ptr<WindowResizer> CreateDragWindowResizer( | 96 virtual std::unique_ptr<WindowResizer> CreateDragWindowResizer( |
| 99 std::unique_ptr<WindowResizer> next_window_resizer, | 97 std::unique_ptr<WindowResizer> next_window_resizer, |
| 100 wm::WindowState* window_state) = 0; | 98 wm::WindowState* window_state) = 0; |
| 101 | 99 |
| 102 // Called when the overview mode is about to be started (before the windows | 100 // Called when the overview mode is about to be started (before the windows |
| 103 // get re-arranged). | 101 // get re-arranged). |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 135 |
| 138 static WmShell* instance_; | 136 static WmShell* instance_; |
| 139 | 137 |
| 140 std::unique_ptr<WmSystemTrayNotifier> system_tray_notifier_; | 138 std::unique_ptr<WmSystemTrayNotifier> system_tray_notifier_; |
| 141 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; | 139 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| 142 }; | 140 }; |
| 143 | 141 |
| 144 } // namespace ash | 142 } // namespace ash |
| 145 | 143 |
| 146 #endif // ASH_COMMON_WM_SHELL_H_ | 144 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |