Index: ash/wm/overview/window_selector.h |
diff --git a/ash/wm/overview/window_selector.h b/ash/wm/overview/window_selector.h |
index 158df2cf7ea2604ca31d8d3354c5573b23f5101e..6239e7e38a30e4bcaab4c40aed7dfc63222aeda9 100644 |
--- a/ash/wm/overview/window_selector.h |
+++ b/ash/wm/overview/window_selector.h |
@@ -36,6 +36,7 @@ namespace ash { |
class WindowSelectorDelegate; |
class WindowSelectorItem; |
class WindowSelectorTest; |
+class WindowGrid; |
// The WindowSelector shows a grid of all of your windows, allowing to select |
// one by clicking or tapping on it. |
@@ -45,6 +46,13 @@ class ASH_EXPORT WindowSelector |
public aura::WindowObserver, |
public aura::client::ActivationChangeObserver { |
public: |
+ enum Direction { |
+ RIGHT, |
+ DOWN, |
+ LEFT, |
+ UP |
+ }; |
+ |
typedef std::vector<aura::Window*> WindowList; |
typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList; |
@@ -84,25 +92,24 @@ class ASH_EXPORT WindowSelector |
// Begins positioning windows such that all windows are visible on the screen. |
void StartOverview(); |
- // Returns true if a window is contained in the overview, and therefore should |
- // not be hidden prior to entering overview mode. |
- bool Contains(const aura::Window* window); |
- |
- // Position all of the windows based on the current selection mode. |
+ // Position all of the windows in the overview. |
void PositionWindows(bool animate); |
- // Position all of the windows from |root_window| on |root_window|. |
- void PositionWindowsFromRoot(aura::Window* root_window, bool animate); |
- // Resets the stored window from RemoveFocusAndSetRestoreWindow to NULL. If |
- // Hide and track all hidden windows not in overview. |
- void HideAndTrackNonOverviewWindows(); |
+ // Creates the WindowGrid objects and populates them with the current windows. |
+ void CreateWindowGrids(); |
+ |
+ // Hide and track all hidden windows not in the overview item list. |
+ void HideAndTrackNonOverviewWindows( |
+ const std::vector<WindowSelectorItem*>& overview_items); |
// |focus|, restores focus to the stored window. |
void ResetFocusRestoreWindow(bool focus); |
- // The collection of items in the overview wrapped by a helper class which |
- // restores their state and helps transform them to other root windows. |
- ScopedVector<WindowSelectorItem> windows_; |
+ // Helper function that moves the selection widget to |direction| on the |
+ // corresponding window grid. |
+ void Move(Direction direction); |
+ |
+ // Returns the WindowSelectorItem |
// Tracks observed windows. |
std::set<aura::Window*> observed_windows_; |
@@ -120,6 +127,9 @@ class ASH_EXPORT WindowSelector |
// used to prevent handling the resulting expected activation. |
bool ignore_activations_; |
+ // List of all the window overview grids, one for each root window. |
+ ScopedVector<WindowGrid> grid_list_; |
+ |
// The time when overview was started. |
base::Time overview_start_time_; |
@@ -127,6 +137,9 @@ class ASH_EXPORT WindowSelector |
// overview. |
aura::WindowTracker hidden_windows_; |
+ // Tracks the index of the root window the selection widget is in. |
+ size_t selected_grid_index_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WindowSelector); |
}; |