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_H_ | 5 #ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ |
6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ | 6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 WindowSelector(const WindowList& windows, | 59 WindowSelector(const WindowList& windows, |
60 WindowSelectorDelegate* delegate); | 60 WindowSelectorDelegate* delegate); |
61 virtual ~WindowSelector(); | 61 virtual ~WindowSelector(); |
62 | 62 |
63 // Cancels window selection. | 63 // Cancels window selection. |
64 void CancelSelection(); | 64 void CancelSelection(); |
65 | 65 |
66 // Called when the last window selector item from a grid is deleted. | 66 // Called when the last window selector item from a grid is deleted. |
67 void OnGridEmpty(WindowGrid* grid); | 67 void OnGridEmpty(WindowGrid* grid); |
68 | 68 |
| 69 // Called when removing a window, adds one to the closed window counter. |
| 70 void on_window_removed() { num_closed_items_++; } |
| 71 |
69 // ui::EventHandler: | 72 // ui::EventHandler: |
70 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 73 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; |
71 | 74 |
72 // gfx::DisplayObserver: | 75 // gfx::DisplayObserver: |
73 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE; | 76 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE; |
74 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE; | 77 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE; |
75 virtual void OnDisplayMetricsChanged(const gfx::Display& display, | 78 virtual void OnDisplayMetricsChanged(const gfx::Display& display, |
76 uint32_t metrics) OVERRIDE; | 79 uint32_t metrics) OVERRIDE; |
77 | 80 |
78 // aura::WindowObserver: | 81 // aura::WindowObserver: |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // this window. | 120 // this window. |
118 aura::Window* restore_focus_window_; | 121 aura::Window* restore_focus_window_; |
119 | 122 |
120 // True when performing operations that may cause window activations. This is | 123 // True when performing operations that may cause window activations. This is |
121 // used to prevent handling the resulting expected activation. | 124 // used to prevent handling the resulting expected activation. |
122 bool ignore_activations_; | 125 bool ignore_activations_; |
123 | 126 |
124 // List of all the window overview grids, one for each root window. | 127 // List of all the window overview grids, one for each root window. |
125 ScopedVector<WindowGrid> grid_list_; | 128 ScopedVector<WindowGrid> grid_list_; |
126 | 129 |
127 // The time when overview was started. | |
128 base::Time overview_start_time_; | |
129 | |
130 // Tracks windows which were hidden because they were not part of the | 130 // Tracks windows which were hidden because they were not part of the |
131 // overview. | 131 // overview. |
132 aura::WindowTracker hidden_windows_; | 132 aura::WindowTracker hidden_windows_; |
133 | 133 |
134 // Tracks the index of the root window the selection widget is in. | 134 // Tracks the index of the root window the selection widget is in. |
135 size_t selected_grid_index_; | 135 size_t selected_grid_index_; |
136 | 136 |
| 137 // The following variables are used for metric collection purposes. All of |
| 138 // them refer to this particular overview session and are not cumulative: |
| 139 // The time when overview was started. |
| 140 base::Time overview_start_time_; |
| 141 |
| 142 // The number of arrow key presses. |
| 143 size_t num_key_presses_; |
| 144 |
| 145 // The number of items in the overview. |
| 146 size_t num_items_; |
| 147 |
| 148 // The number of items that were removed from the overview. |
| 149 size_t num_closed_items_; |
| 150 |
137 DISALLOW_COPY_AND_ASSIGN(WindowSelector); | 151 DISALLOW_COPY_AND_ASSIGN(WindowSelector); |
138 }; | 152 }; |
139 | 153 |
140 } // namespace ash | 154 } // namespace ash |
141 | 155 |
142 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ | 156 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ |
OLD | NEW |