| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 UP, | 61 UP, |
| 62 RIGHT, | 62 RIGHT, |
| 63 DOWN | 63 DOWN |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 typedef std::vector<aura::Window*> WindowList; | 66 typedef std::vector<aura::Window*> WindowList; |
| 67 typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList; | 67 typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList; |
| 68 | 68 |
| 69 WindowSelector(const WindowList& windows, | 69 WindowSelector(const WindowList& windows, |
| 70 WindowSelectorDelegate* delegate); | 70 WindowSelectorDelegate* delegate); |
| 71 virtual ~WindowSelector(); | 71 ~WindowSelector() override; |
| 72 | 72 |
| 73 // Cancels window selection. | 73 // Cancels window selection. |
| 74 void CancelSelection(); | 74 void CancelSelection(); |
| 75 | 75 |
| 76 // Called when the last window selector item from a grid is deleted. | 76 // Called when the last window selector item from a grid is deleted. |
| 77 void OnGridEmpty(WindowGrid* grid); | 77 void OnGridEmpty(WindowGrid* grid); |
| 78 | 78 |
| 79 // gfx::DisplayObserver: | 79 // gfx::DisplayObserver: |
| 80 virtual void OnDisplayAdded(const gfx::Display& display) override; | 80 void OnDisplayAdded(const gfx::Display& display) override; |
| 81 virtual void OnDisplayRemoved(const gfx::Display& display) override; | 81 void OnDisplayRemoved(const gfx::Display& display) override; |
| 82 virtual void OnDisplayMetricsChanged(const gfx::Display& display, | 82 void OnDisplayMetricsChanged(const gfx::Display& display, |
| 83 uint32_t metrics) override; | 83 uint32_t metrics) override; |
| 84 | 84 |
| 85 // aura::WindowObserver: | 85 // aura::WindowObserver: |
| 86 virtual void OnWindowAdded(aura::Window* new_window) override; | 86 void OnWindowAdded(aura::Window* new_window) override; |
| 87 virtual void OnWindowDestroying(aura::Window* window) override; | 87 void OnWindowDestroying(aura::Window* window) override; |
| 88 | 88 |
| 89 // aura::client::ActivationChangeObserver: | 89 // aura::client::ActivationChangeObserver: |
| 90 virtual void OnWindowActivated(aura::Window* gained_active, | 90 void OnWindowActivated(aura::Window* gained_active, |
| 91 aura::Window* lost_active) override; | 91 aura::Window* lost_active) override; |
| 92 virtual void OnAttemptToReactivateWindow( | 92 void OnAttemptToReactivateWindow(aura::Window* request_active, |
| 93 aura::Window* request_active, | 93 aura::Window* actual_active) override; |
| 94 aura::Window* actual_active) override; | |
| 95 | 94 |
| 96 // views::TextfieldController: | 95 // views::TextfieldController: |
| 97 virtual void ContentsChanged(views::Textfield* sender, | 96 void ContentsChanged(views::Textfield* sender, |
| 98 const base::string16& new_contents) override; | 97 const base::string16& new_contents) override; |
| 99 virtual bool HandleKeyEvent(views::Textfield* sender, | 98 bool HandleKeyEvent(views::Textfield* sender, |
| 100 const ui::KeyEvent& key_event) override; | 99 const ui::KeyEvent& key_event) override; |
| 101 | 100 |
| 102 private: | 101 private: |
| 103 friend class WindowSelectorTest; | 102 friend class WindowSelectorTest; |
| 104 | 103 |
| 105 // Begins positioning windows such that all windows are visible on the screen. | 104 // Begins positioning windows such that all windows are visible on the screen. |
| 106 void StartOverview(); | 105 void StartOverview(); |
| 107 | 106 |
| 108 // Position all of the windows in the overview. | 107 // Position all of the windows in the overview. |
| 109 void PositionWindows(bool animate); | 108 void PositionWindows(bool animate); |
| 110 | 109 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // The number of times the text filtering textfield has been cleared of text | 168 // The number of times the text filtering textfield has been cleared of text |
| 170 // during this overview mode session. | 169 // during this overview mode session. |
| 171 size_t num_times_textfield_cleared_; | 170 size_t num_times_textfield_cleared_; |
| 172 | 171 |
| 173 DISALLOW_COPY_AND_ASSIGN(WindowSelector); | 172 DISALLOW_COPY_AND_ASSIGN(WindowSelector); |
| 174 }; | 173 }; |
| 175 | 174 |
| 176 } // namespace ash | 175 } // namespace ash |
| 177 | 176 |
| 178 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ | 177 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ |
| OLD | NEW |