| 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> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class RootWindowController; | 43 class RootWindowController; |
| 44 class ScopedDisableInternalMouseAndKeyboard; | 44 class ScopedDisableInternalMouseAndKeyboard; |
| 45 class SessionStateDelegate; | 45 class SessionStateDelegate; |
| 46 struct ShellInitParams; | 46 struct ShellInitParams; |
| 47 class WindowCycleEventFilter; | 47 class WindowCycleEventFilter; |
| 48 class WindowResizer; | 48 class WindowResizer; |
| 49 class WmDisplayObserver; | 49 class WmDisplayObserver; |
| 50 class WmWindow; | 50 class WmWindow; |
| 51 class WorkspaceEventHandler; | 51 class WorkspaceEventHandler; |
| 52 | 52 |
| 53 enum class Config; |
| 53 enum class LoginStatus; | 54 enum class LoginStatus; |
| 54 enum class TaskSwitchSource; | 55 enum class TaskSwitchSource; |
| 55 | 56 |
| 56 namespace wm { | 57 namespace wm { |
| 57 class MaximizeModeEventHandler; | 58 class MaximizeModeEventHandler; |
| 58 class WindowState; | 59 class WindowState; |
| 59 } | 60 } |
| 60 | 61 |
| 61 // Similar to ash::Shell. Eventually the two will be merged. | 62 // Similar to ash::Shell. Eventually the two will be merged. |
| 62 class ASH_EXPORT WmShell { | 63 class ASH_EXPORT WmShell { |
| 63 public: | 64 public: |
| 64 virtual ~WmShell(); | 65 virtual ~WmShell(); |
| 65 | 66 |
| 66 static WmShell* Get(); | 67 static WmShell* Get(); |
| 67 static bool HasInstance() { return instance_ != nullptr; } | 68 static bool HasInstance() { return instance_ != nullptr; } |
| 68 | 69 |
| 69 virtual void Shutdown(); | 70 virtual void Shutdown(); |
| 70 | 71 |
| 71 // Returns true when ash is running as a service_manager::Service. | 72 // Returns true when ash is running as a service_manager::Service. |
| 73 // TODO(sky): remove and convert to GetConfig(). |
| 72 virtual bool IsRunningInMash() const = 0; | 74 virtual bool IsRunningInMash() const = 0; |
| 75 virtual Config GetConfig() const = 0; |
| 73 | 76 |
| 74 virtual WmWindow* GetFocusedWindow() = 0; | 77 virtual WmWindow* GetFocusedWindow() = 0; |
| 75 virtual WmWindow* GetActiveWindow() = 0; | 78 virtual WmWindow* GetActiveWindow() = 0; |
| 76 | 79 |
| 77 virtual WmWindow* GetCaptureWindow() = 0; | 80 virtual WmWindow* GetCaptureWindow() = 0; |
| 78 | 81 |
| 79 // Convenience for GetPrimaryRootWindow()->GetRootWindowController(). | 82 // Convenience for GetPrimaryRootWindow()->GetRootWindowController(). |
| 80 RootWindowController* GetPrimaryRootWindowController(); | 83 RootWindowController* GetPrimaryRootWindowController(); |
| 81 | 84 |
| 82 virtual WmWindow* GetPrimaryRootWindow() = 0; | 85 virtual WmWindow* GetPrimaryRootWindow() = 0; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 static WmShell* instance_; | 242 static WmShell* instance_; |
| 240 | 243 |
| 241 base::ObserverList<LockStateObserver> lock_state_observers_; | 244 base::ObserverList<LockStateObserver> lock_state_observers_; |
| 242 | 245 |
| 243 bool simulate_modal_window_open_for_testing_ = false; | 246 bool simulate_modal_window_open_for_testing_ = false; |
| 244 }; | 247 }; |
| 245 | 248 |
| 246 } // namespace ash | 249 } // namespace ash |
| 247 | 250 |
| 248 #endif // ASH_COMMON_WM_SHELL_H_ | 251 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |