Index: ash/wm/overview/window_selector.h |
diff --git a/ash/wm/overview/window_selector.h b/ash/wm/overview/window_selector.h |
index bfb0c143f9d2e81c53ae0457556db87c230bcfb2..5b32c003c16a158a23c740a83ca2497d4797e252 100644 |
--- a/ash/wm/overview/window_selector.h |
+++ b/ash/wm/overview/window_selector.h |
@@ -39,6 +39,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. |
@@ -48,6 +49,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; |
@@ -93,10 +101,11 @@ class ASH_EXPORT WindowSelector |
// Begins positioning windows such that all windows are visible on the screen. |
void StartOverview(); |
- // 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); |
+ |
+ // Creates the WindowGrid objects and populates them with the current windows. |
+ void CreateWindowGrids(); |
// Resets the stored window from RemoveFocusAndSetRestoreWindow to NULL. If |
// Hide and track all hidden windows not in overview. |
@@ -113,6 +122,10 @@ class ASH_EXPORT WindowSelector |
// no overview window was found for |window|. |
aura::Window* GetTargetedWindow(aura::Window* window); |
+ // Helper function that moves the selection widget to |direction| on the |
+ // corresponding window grid. |
+ void Move(Direction direction); |
+ |
// 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_; |
@@ -133,6 +146,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 cursor client used to lock the current cursor during overview. |
aura::client::CursorClient* cursor_client_; |
@@ -143,6 +159,9 @@ class ASH_EXPORT WindowSelector |
// overview. |
aura::WindowTracker hidden_windows_; |
+ // Tracks the index of the root window the selection widget is in. |
+ size_t root_index_; |
flackr
2014/05/29 20:04:25
nit: selected_grid_index_ or something like that.
Nina
2014/06/02 22:04:38
Done.
|
+ |
DISALLOW_COPY_AND_ASSIGN(WindowSelector); |
}; |