Index: ash/wm/window_cycle_controller.h |
diff --git a/ash/wm/window_cycle_controller.h b/ash/wm/window_cycle_controller.h |
index 9f5b8be9cfbe0092609e3955ca6347601a7b6007..407dc0f400d290c033c636953bc225010bd6a662 100644 |
--- a/ash/wm/window_cycle_controller.h |
+++ b/ash/wm/window_cycle_controller.h |
@@ -9,6 +9,7 @@ |
#include <vector> |
#include "ash/ash_export.h" |
+#include "ash/wm/window_selector_delegate.h" |
#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
#include "ui/aura/client/activation_change_observer.h" |
@@ -29,6 +30,7 @@ class EventHandler; |
namespace ash { |
class WindowCycleList; |
+class WindowSelector; |
// Controls cycling through windows with the keyboard, for example, via alt-tab. |
// Windows are sorted primarily by most recently used, and then by screen order. |
@@ -39,7 +41,8 @@ class WindowCycleList; |
// order. |
class ASH_EXPORT WindowCycleController |
: public aura::client::ActivationChangeObserver, |
- public aura::WindowObserver { |
+ public aura::WindowObserver, |
+ public WindowSelectorDelegate { |
sky
2013/07/25 21:18:37
Is there a reason for baking the overview into thi
flackr
2013/07/25 21:34:33
Eventually, we'll use overview (WindowSelector) fo
|
public: |
enum Direction { |
FORWARD, |
@@ -66,6 +69,11 @@ class ASH_EXPORT WindowCycleController |
// terminate the existing multi-step cycle. |
void AltKeyReleased(); |
+ // Enters overview mode. This is essentially the window cycling mode however |
+ // not released on releasing the alt key and allows selecting with the mouse |
+ // or touch rather than keypresses. |
+ void ToggleOverview(); |
+ |
// Returns true if we are in the middle of a window cycling gesture. |
bool IsCycling() const { return windows_.get() != NULL; } |
@@ -88,6 +96,9 @@ class ASH_EXPORT WindowCycleController |
const std::list<aura::Window*>* mru_windows, |
bool top_most_at_end); |
+ // WindowSelectorDelegate: |
+ virtual void SelectWindow(aura::Window* window) OVERRIDE; |
+ |
private: |
// Call to start cycling windows. You must call StopCycling() when done. |
void StartCycling(); |
@@ -113,6 +124,7 @@ class ASH_EXPORT WindowCycleController |
virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE; |
virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
+ scoped_ptr<WindowSelector> window_selector_; |
scoped_ptr<WindowCycleList> windows_; |
// Event handler to watch for release of alt key. |