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 12 matching lines...) Expand all Loading... |
23 namespace ash { | 23 namespace ash { |
24 class WindowSelector; | 24 class WindowSelector; |
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 virtual ~WindowSelectorController(); | 33 ~WindowSelectorController() override; |
34 | 34 |
35 // Returns true if selecting windows in an overview is enabled. This is false | 35 // Returns true if selecting windows in an overview is enabled. This is false |
36 // at certain times, such as when the lock screen is visible. | 36 // at certain times, such as when the lock screen is visible. |
37 static bool CanSelect(); | 37 static bool CanSelect(); |
38 | 38 |
39 // Enters overview mode. This is essentially the window cycling mode however | 39 // 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 | 40 // not released on releasing the alt key and allows selecting with the mouse |
41 // or touch rather than keypresses. | 41 // or touch rather than keypresses. |
42 void ToggleOverview(); | 42 void ToggleOverview(); |
43 | 43 |
44 // Returns true if window selection mode is active. | 44 // Returns true if window selection mode is active. |
45 bool IsSelecting(); | 45 bool IsSelecting(); |
46 | 46 |
47 // WindowSelectorDelegate: | 47 // WindowSelectorDelegate: |
48 virtual void OnSelectionEnded() override; | 48 void OnSelectionEnded() override; |
49 | 49 |
50 private: | 50 private: |
51 friend class WindowSelectorTest; | 51 friend class WindowSelectorTest; |
52 | 52 |
53 // Dispatched when window selection begins. | 53 // Dispatched when window selection begins. |
54 void OnSelectionStarted(); | 54 void OnSelectionStarted(); |
55 | 55 |
56 scoped_ptr<WindowSelector> window_selector_; | 56 scoped_ptr<WindowSelector> window_selector_; |
57 base::Time last_selection_time_; | 57 base::Time last_selection_time_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(WindowSelectorController); | 59 DISALLOW_COPY_AND_ASSIGN(WindowSelectorController); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace ash | 62 } // namespace ash |
63 | 63 |
64 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ | 64 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ |
OLD | NEW |