| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 // Called when a modal window is removed. It will activate another modal | 129 // Called when a modal window is removed. It will activate another modal |
| 130 // window if any, or remove modal screens on all displays. | 130 // window if any, or remove modal screens on all displays. |
| 131 void OnModalWindowRemoved(WmWindow* removed); | 131 void OnModalWindowRemoved(WmWindow* removed); |
| 132 | 132 |
| 133 // For testing only: set simulation that a modal window is open | 133 // For testing only: set simulation that a modal window is open |
| 134 void SimulateModalWindowOpenForTesting(bool modal_window_open) { | 134 void SimulateModalWindowOpenForTesting(bool modal_window_open) { |
| 135 simulate_modal_window_open_for_testing_ = modal_window_open; | 135 simulate_modal_window_open_for_testing_ = modal_window_open; |
| 136 } | 136 } |
| 137 | 137 |
| 138 // Returns true if a window is currently pinned. | |
| 139 virtual bool IsPinned() = 0; | |
| 140 | |
| 141 // Sets/Unsets the |window| to as a pinned window. If this is called with a | |
| 142 // window with WINDOW_STATE_TYPE_PINNED state, then this sets the |window| | |
| 143 // as a pinned window. Otherwise, this unsets it. | |
| 144 // For setting, a caller needs to guarantee that no windows are set | |
| 145 // as pinned window. For unsetting, a caller needs to guarantee that the | |
| 146 // |window| is the one which is currently set as a pinned window via previous | |
| 147 // this function invocation. | |
| 148 virtual void SetPinnedWindow(WmWindow* window) = 0; | |
| 149 | |
| 150 // See aura::client::CursorClient for details on these. | 138 // See aura::client::CursorClient for details on these. |
| 151 virtual void LockCursor() = 0; | 139 virtual void LockCursor() = 0; |
| 152 virtual void UnlockCursor() = 0; | 140 virtual void UnlockCursor() = 0; |
| 153 virtual bool IsMouseEventsEnabled() = 0; | 141 virtual bool IsMouseEventsEnabled() = 0; |
| 154 | 142 |
| 155 virtual std::vector<WmWindow*> GetAllRootWindows() = 0; | 143 virtual std::vector<WmWindow*> GetAllRootWindows() = 0; |
| 156 | 144 |
| 157 virtual void RecordGestureAction(GestureActionType action) = 0; | 145 virtual void RecordGestureAction(GestureActionType action) = 0; |
| 158 virtual void RecordUserMetricsAction(UserMetricsAction action) = 0; | 146 virtual void RecordUserMetricsAction(UserMetricsAction action) = 0; |
| 159 virtual void RecordTaskSwitchMetric(TaskSwitchSource source) = 0; | 147 virtual void RecordTaskSwitchMetric(TaskSwitchSource source) = 0; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 static WmShell* instance_; | 230 static WmShell* instance_; |
| 243 | 231 |
| 244 base::ObserverList<LockStateObserver> lock_state_observers_; | 232 base::ObserverList<LockStateObserver> lock_state_observers_; |
| 245 | 233 |
| 246 bool simulate_modal_window_open_for_testing_ = false; | 234 bool simulate_modal_window_open_for_testing_ = false; |
| 247 }; | 235 }; |
| 248 | 236 |
| 249 } // namespace ash | 237 } // namespace ash |
| 250 | 238 |
| 251 #endif // ASH_COMMON_WM_SHELL_H_ | 239 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |