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

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: Address comments. 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
« no previous file with comments | « ash/wm/window_cycle_controller.cc ('k') | chrome/browser/chromeos/extensions/wallpaper_private_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..428804f66f0d14e3c576facd2194ff5a7b7db80f 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()->SetIgnoreActivations(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()->SetIgnoreActivations(false);
for (WindowList::const_iterator i = windows_.begin(); i != windows_.end();
++i) {
(*i)->RemoveObserver(this);
« no previous file with comments | « ash/wm/window_cycle_controller.cc ('k') | chrome/browser/chromeos/extensions/wallpaper_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698