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 23 matching lines...) Expand all Loading... |
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 // Cycles between windows in the given |direction|. It is assumed that the | |
45 // alt key is held down and a key filter is installed to watch for alt being | |
46 // released. | |
47 void HandleCycleWindow(WindowSelector::Direction direction); | |
48 | |
49 // Returns true if window selection mode is active. | 44 // Returns true if window selection mode is active. |
50 bool IsSelecting(); | 45 bool IsSelecting(); |
51 | 46 |
52 // WindowSelectorDelegate: | 47 // WindowSelectorDelegate: |
53 virtual void OnWindowSelected(aura::Window* window) OVERRIDE; | 48 virtual void OnWindowSelected(aura::Window* window) OVERRIDE; |
54 virtual void OnSelectionCanceled() OVERRIDE; | 49 virtual void OnSelectionCanceled() OVERRIDE; |
55 | 50 |
56 private: | 51 private: |
57 friend class WindowSelectorTest; | 52 friend class WindowSelectorTest; |
58 | 53 |
59 // Dispatched when window selection begins. | 54 // Dispatched when window selection begins. |
60 void OnSelectionStarted(); | 55 void OnSelectionStarted(); |
61 | 56 |
62 scoped_ptr<WindowSelector> window_selector_; | 57 scoped_ptr<WindowSelector> window_selector_; |
63 base::Time last_selection_time_; | 58 base::Time last_selection_time_; |
64 | 59 |
65 DISALLOW_COPY_AND_ASSIGN(WindowSelectorController); | 60 DISALLOW_COPY_AND_ASSIGN(WindowSelectorController); |
66 }; | 61 }; |
67 | 62 |
68 } // namespace ash | 63 } // namespace ash |
69 | 64 |
70 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ | 65 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ |
OLD | NEW |