| 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_OVERVIEW_H_ | 5 #ifndef ASH_WM_OVERVIEW_WINDOW_OVERVIEW_H_ |
| 6 #define ASH_WM_OVERVIEW_WINDOW_OVERVIEW_H_ | 6 #define ASH_WM_OVERVIEW_WINDOW_OVERVIEW_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 class WindowOverview : public ui::EventHandler, | 40 class WindowOverview : public ui::EventHandler, |
| 41 public gfx::DisplayObserver { | 41 public gfx::DisplayObserver { |
| 42 public: | 42 public: |
| 43 typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList; | 43 typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList; |
| 44 | 44 |
| 45 // Enters an overview mode displaying |windows| and dispatches methods | 45 // Enters an overview mode displaying |windows| and dispatches methods |
| 46 // on |window_selector| when a window is selected or selection is canceled. | 46 // on |window_selector| when a window is selected or selection is canceled. |
| 47 // If |single_root_window| is not NULL, all windows will be positioned on the | 47 // If |single_root_window| is not NULL, all windows will be positioned on the |
| 48 // given root window. | 48 // given root window. |
| 49 WindowOverview(WindowSelector* window_selector, | 49 WindowOverview(WindowSelector* window_selector, |
| 50 WindowSelectorItemList* windows, | 50 WindowSelectorItemList* windows); |
| 51 aura::Window* single_root_window); | |
| 52 virtual ~WindowOverview(); | 51 virtual ~WindowOverview(); |
| 53 | 52 |
| 54 // Sets the selected window to be the window in position |index|. | 53 // Sets the selected window to be the window in position |index|. |
| 55 void SetSelection(size_t index); | 54 void SetSelection(size_t index); |
| 56 | 55 |
| 57 // Dispatched when the list of windows has changed. | 56 // Dispatched when the list of windows has changed. |
| 58 void OnWindowsChanged(); | 57 void OnWindowsChanged(); |
| 59 | 58 |
| 60 // Moves the overview to only |root_window|. | |
| 61 void MoveToSingleRootWindow(aura::Window* root_window); | |
| 62 | |
| 63 // ui::EventHandler: | 59 // ui::EventHandler: |
| 64 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 60 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; |
| 65 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 61 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
| 66 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 62 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; |
| 67 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 63 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; |
| 68 | 64 |
| 69 // gfx::DisplayObserver: | 65 // gfx::DisplayObserver: |
| 70 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE; | 66 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE; |
| 71 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE; | 67 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE; |
| 72 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE; | 68 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // Tracks windows which were hidden because they were not part of the | 123 // Tracks windows which were hidden because they were not part of the |
| 128 // overview. | 124 // overview. |
| 129 aura::WindowTracker hidden_windows_; | 125 aura::WindowTracker hidden_windows_; |
| 130 | 126 |
| 131 DISALLOW_COPY_AND_ASSIGN(WindowOverview); | 127 DISALLOW_COPY_AND_ASSIGN(WindowOverview); |
| 132 }; | 128 }; |
| 133 | 129 |
| 134 } // namespace ash | 130 } // namespace ash |
| 135 | 131 |
| 136 #endif // ASH_WM_OVERVIEW_WINDOW_OVERVIEW_H_ | 132 #endif // ASH_WM_OVERVIEW_WINDOW_OVERVIEW_H_ |
| OLD | NEW |