Index: ash/wm/window_cycle_controller.h |
diff --git a/ash/wm/window_cycle_controller.h b/ash/wm/window_cycle_controller.h |
index aa667899d45e6e2cc7e70798b4ea067c9f1af9c9..33e8dcff149c916e1b3b6eca2cea52c5e945d7c0 100644 |
--- a/ash/wm/window_cycle_controller.h |
+++ b/ash/wm/window_cycle_controller.h |
@@ -5,11 +5,13 @@ |
#ifndef ASH_WM_WINDOW_CYCLE_CONTROLLER_H_ |
#define ASH_WM_WINDOW_CYCLE_CONTROLLER_H_ |
+#include <list> |
#include <vector> |
#include "ash/ash_export.h" |
#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
+#include "ui/aura/client/activation_change_observer.h" |
namespace aura { |
class EventFilter; |
@@ -25,7 +27,8 @@ class WindowCycleList; |
// may change during the gesture. Thus we maintain the state of the windows |
sky
2012/07/19 16:41:15
Update description to reflect changes.
Zachary Kuznia
2012/07/23 22:44:33
Done.
|
// at the beginning of the gesture so you can cycle through in a consistent |
// order. |
-class ASH_EXPORT WindowCycleController { |
+class ASH_EXPORT WindowCycleController |
+ : public aura::client::ActivationChangeObserver { |
public: |
enum Direction { |
FORWARD, |
@@ -57,7 +60,10 @@ class ASH_EXPORT WindowCycleController { |
// the vector based on the current set of windows across all valid root |
// windows. As a result it is not necessarily the same as the set of |
// windows being iterated over. |
- static std::vector<aura::Window*> BuildWindowList(); |
+ // If |mru_windows| is not NULL, windows in this list are put at the head of |
+ // the window list. |
+ static std::vector<aura::Window*> BuildWindowList( |
+ std::list<aura::Window*>* mru_windows); |
private: |
// Call to start cycling windows. You must call StopCycling() when done. |
@@ -72,11 +78,19 @@ class ASH_EXPORT WindowCycleController { |
// Stops the current window cycle and cleans up the event filter. |
void StopCycling(); |
+ // Overridden from ActivationChangeObserver: |
+ virtual void OnWindowActivated(aura::Window* active, |
+ aura::Window* old_active) OVERRIDE; |
+ |
scoped_ptr<WindowCycleList> windows_; |
// Event filter to watch for release of alt key. |
scoped_ptr<aura::EventFilter> event_filter_; |
+ std::list<aura::Window*> mru_windows_; |
Daniel Erat
2012/07/19 15:14:17
nit: add a comment describing what this is (e.g. o
Zachary Kuznia
2012/07/23 22:44:33
Done.
|
+ |
+ bool mru_ignore_; |
Daniel Erat
2012/07/19 15:14:17
nit: add a comment describing what this is
Zachary Kuznia
2012/07/23 22:44:33
Done.
|
+ |
DISALLOW_COPY_AND_ASSIGN(WindowCycleController); |
}; |