Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1792)

Unified Diff: ash/wm/window_cycle_controller.h

Issue 10700057: Add always on top windows to the alt+tab list (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use most recently used windows. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698