OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ | 5 #ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ |
6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ | 6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 class WindowSelectorTest; | 25 class WindowSelectorTest; |
26 | 26 |
27 // Manages a window selector which displays an overview of all windows and | 27 // Manages a window selector which displays an overview of all windows and |
28 // allows selecting a window to activate it. | 28 // allows selecting a window to activate it. |
29 class ASH_EXPORT WindowSelectorController | 29 class ASH_EXPORT WindowSelectorController |
30 : public WindowSelectorDelegate { | 30 : public WindowSelectorDelegate { |
31 public: | 31 public: |
32 WindowSelectorController(); | 32 WindowSelectorController(); |
33 ~WindowSelectorController() override; | 33 ~WindowSelectorController() override; |
34 | 34 |
35 // Returns true if selecting windows in an overview is enabled. This is false | 35 // Returns true if the user is in an active desktop environment, i.e., they |
36 // at certain times, such as when the lock screen is visible. | 36 // are logged in, the screen is not locked, and they are not running in |
| 37 // kiosk mode. |
| 38 static bool IsUserInActiveDesktopEnvironment(); |
| 39 |
| 40 // Returns true if the user is permitted to engage overview mode (the user |
| 41 // must be in an active desktop environment and must not have any modal |
| 42 // windows open). |
37 static bool CanSelect(); | 43 static bool CanSelect(); |
38 | 44 |
39 // Enters overview mode. This is essentially the window cycling mode however | 45 // Enters overview mode. This is essentially the window cycling mode however |
40 // not released on releasing the alt key and allows selecting with the mouse | 46 // not released on releasing the alt key and allows selecting with the mouse |
41 // or touch rather than keypresses. | 47 // or touch rather than keypresses. |
42 void ToggleOverview(); | 48 void ToggleOverview(); |
43 | 49 |
44 // Returns true if window selection mode is active. | 50 // Returns true if window selection mode is active. |
45 bool IsSelecting(); | 51 bool IsSelecting(); |
46 | 52 |
(...skipping 12 matching lines...) Expand all Loading... |
59 | 65 |
60 scoped_ptr<WindowSelector> window_selector_; | 66 scoped_ptr<WindowSelector> window_selector_; |
61 base::Time last_selection_time_; | 67 base::Time last_selection_time_; |
62 | 68 |
63 DISALLOW_COPY_AND_ASSIGN(WindowSelectorController); | 69 DISALLOW_COPY_AND_ASSIGN(WindowSelectorController); |
64 }; | 70 }; |
65 | 71 |
66 } // namespace ash | 72 } // namespace ash |
67 | 73 |
68 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ | 74 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ |
OLD | NEW |