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

Unified Diff: ash/wm/window_cycle_list.cc

Issue 20708005: Refactor most recently used window tracking into a separate class. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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_list.cc
diff --git a/ash/wm/window_cycle_list.cc b/ash/wm/window_cycle_list.cc
index fd39d0f4b9f890fbe97f3395a7d8a3e8a6c18072..8acfe00f6eadb406c8c9e839f11806f37fecc622 100644
--- a/ash/wm/window_cycle_list.cc
+++ b/ash/wm/window_cycle_list.cc
@@ -4,6 +4,8 @@
#include "ash/wm/window_cycle_list.h"
+#include "ash/shell.h"
+#include "ash/wm/mru_window_tracker.h"
#include "ash/wm/window_util.h"
#include "ui/aura/window.h"
#include "ui/views/corewm/window_animations.h"
@@ -13,6 +15,7 @@ namespace ash {
WindowCycleList::WindowCycleList(const WindowList& windows)
: windows_(windows),
current_index_(-1) {
+ ash::Shell::GetInstance()->mru_window_tracker()->IgnoreActivations(true);
// Locate the currently active window in the list to use as our start point.
aura::Window* active_window = wm::GetActiveWindow();
@@ -27,6 +30,7 @@ WindowCycleList::WindowCycleList(const WindowList& windows)
}
WindowCycleList::~WindowCycleList() {
+ ash::Shell::GetInstance()->mru_window_tracker()->IgnoreActivations(false);
for (WindowList::const_iterator i = windows_.begin(); i != windows_.end();
++i) {
(*i)->RemoveObserver(this);

Powered by Google App Engine
This is Rietveld 408576698