| 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_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_H_ |
| 6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ | 6 #define ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <set> | 12 #include <set> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "ash/ash_export.h" | 15 #include "ash/ash_export.h" |
| 16 #include "ash/common/wm_activation_observer.h" | 16 #include "ash/common/wm_activation_observer.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 35 // The WindowSelector shows a grid of all of your windows, allowing to select | 35 // The WindowSelector shows a grid of all of your windows, allowing to select |
| 36 // one by clicking or tapping on it. | 36 // one by clicking or tapping on it. |
| 37 class ASH_EXPORT WindowSelector : public display::DisplayObserver, | 37 class ASH_EXPORT WindowSelector : public display::DisplayObserver, |
| 38 public WmWindowObserver, | 38 public WmWindowObserver, |
| 39 public WmActivationObserver, | 39 public WmActivationObserver, |
| 40 public views::TextfieldController { | 40 public views::TextfieldController { |
| 41 public: | 41 public: |
| 42 // Returns true if the window can be selected in overview mode. | 42 // Returns true if the window can be selected in overview mode. |
| 43 static bool IsSelectable(WmWindow* window); | 43 static bool IsSelectable(WmWindow* window); |
| 44 | 44 |
| 45 enum Direction { | 45 enum Direction { LEFT, UP, RIGHT, DOWN }; |
| 46 LEFT, | |
| 47 UP, | |
| 48 RIGHT, | |
| 49 DOWN | |
| 50 }; | |
| 51 | 46 |
| 52 using WindowList = std::vector<WmWindow*>; | 47 using WindowList = std::vector<WmWindow*>; |
| 53 | 48 |
| 54 explicit WindowSelector(WindowSelectorDelegate* delegate); | 49 explicit WindowSelector(WindowSelectorDelegate* delegate); |
| 55 ~WindowSelector() override; | 50 ~WindowSelector() override; |
| 56 | 51 |
| 57 // Initialize with the windows that can be selected. | 52 // Initialize with the windows that can be selected. |
| 58 void Init(const WindowList& windows); | 53 void Init(const WindowList& windows); |
| 59 | 54 |
| 60 // Perform cleanup that cannot be done in the destructor. | 55 // Perform cleanup that cannot be done in the destructor. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 174 |
| 180 // The distance between the top edge of the screen and the bottom edge of | 175 // The distance between the top edge of the screen and the bottom edge of |
| 181 // the text filtering textfield. | 176 // the text filtering textfield. |
| 182 int text_filter_bottom_; | 177 int text_filter_bottom_; |
| 183 | 178 |
| 184 DISALLOW_COPY_AND_ASSIGN(WindowSelector); | 179 DISALLOW_COPY_AND_ASSIGN(WindowSelector); |
| 185 }; | 180 }; |
| 186 | 181 |
| 187 } // namespace ash | 182 } // namespace ash |
| 188 | 183 |
| 189 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ | 184 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_H_ |
| OLD | NEW |