| 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 <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void IncrementSelection(int increment); | 42 void IncrementSelection(int increment); |
| 43 | 43 |
| 44 // Accepts current selection if any. Returns true if a selection was made, | 44 // Accepts current selection if any. Returns true if a selection was made, |
| 45 // false otherwise. | 45 // false otherwise. |
| 46 bool AcceptSelection(); | 46 bool AcceptSelection(); |
| 47 | 47 |
| 48 // Returns true if overview mode is restoring minimized windows so that they | 48 // Returns true if overview mode is restoring minimized windows so that they |
| 49 // are visible during overview mode. | 49 // are visible during overview mode. |
| 50 bool IsRestoringMinimizedWindows() const; | 50 bool IsRestoringMinimizedWindows() const; |
| 51 | 51 |
| 52 // Gets the windows list that are shown in the overview windows grids if the |
| 53 // overview mode is active for testing. |
| 54 std::vector<aura::Window*> GetWindowsListInOverviewGridsForTesting(); |
| 55 |
| 52 // WindowSelectorDelegate: | 56 // WindowSelectorDelegate: |
| 53 void OnSelectionEnded() override; | 57 void OnSelectionEnded() override; |
| 54 void AddDelayedAnimationObserver( | 58 void AddDelayedAnimationObserver( |
| 55 std::unique_ptr<DelayedAnimationObserver> animation) override; | 59 std::unique_ptr<DelayedAnimationObserver> animation) override; |
| 56 void RemoveAndDestroyAnimationObserver( | 60 void RemoveAndDestroyAnimationObserver( |
| 57 DelayedAnimationObserver* animation) override; | 61 DelayedAnimationObserver* animation) override; |
| 58 | 62 |
| 59 private: | 63 private: |
| 60 friend class WindowSelectorTest; | 64 friend class WindowSelectorTest; |
| 61 | 65 |
| 62 // Dispatched when window selection begins. | 66 // Dispatched when window selection begins. |
| 63 void OnSelectionStarted(); | 67 void OnSelectionStarted(); |
| 64 | 68 |
| 65 // Collection of DelayedAnimationObserver objects that own widgets that may be | 69 // Collection of DelayedAnimationObserver objects that own widgets that may be |
| 66 // still animating after overview mode ends. If shell needs to shut down while | 70 // still animating after overview mode ends. If shell needs to shut down while |
| 67 // those animations are in progress, the animations are shut down and the | 71 // those animations are in progress, the animations are shut down and the |
| 68 // widgets destroyed. | 72 // widgets destroyed. |
| 69 std::vector<std::unique_ptr<DelayedAnimationObserver>> delayed_animations_; | 73 std::vector<std::unique_ptr<DelayedAnimationObserver>> delayed_animations_; |
| 70 std::unique_ptr<WindowSelector> window_selector_; | 74 std::unique_ptr<WindowSelector> window_selector_; |
| 71 base::Time last_selection_time_; | 75 base::Time last_selection_time_; |
| 72 | 76 |
| 73 DISALLOW_COPY_AND_ASSIGN(WindowSelectorController); | 77 DISALLOW_COPY_AND_ASSIGN(WindowSelectorController); |
| 74 }; | 78 }; |
| 75 | 79 |
| 76 } // namespace ash | 80 } // namespace ash |
| 77 | 81 |
| 78 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ | 82 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_ |
| OLD | NEW |