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

Unified Diff: ash/wm/mru_window_tracker.cc

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 years, 7 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/immersive_context_ash.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/mru_window_tracker.cc
diff --git a/ash/wm/mru_window_tracker.cc b/ash/wm/mru_window_tracker.cc
index c44c1755fc5b0be63623e561145cff224f408033..07d87c4f7ecc3018702a6d6821bda662c93ad860 100644
--- a/ash/wm/mru_window_tracker.cc
+++ b/ash/wm/mru_window_tracker.cc
@@ -46,9 +46,9 @@ MruWindowTracker::WindowList BuildWindowListInternal(
const std::list<WmWindow*>* mru_windows,
const CanActivateWindowPredicate& should_include_window_predicate) {
MruWindowTracker::WindowList windows;
- WmWindow* active_root = Shell::GetWmRootWindowForNewWindows();
+ aura::Window* active_root = Shell::GetRootWindowForNewWindows();
for (WmWindow* window : ShellPort::Get()->GetAllRootWindows()) {
- if (window == active_root)
+ if (window->aura_window() == active_root)
continue;
for (size_t i = 0; i < wm::kSwitchableWindowContainerIdsLength; ++i)
AddTrackedWindows(window, wm::kSwitchableWindowContainerIds[i], &windows);
@@ -56,9 +56,10 @@ MruWindowTracker::WindowList BuildWindowListInternal(
// Add windows in the active root windows last so that the topmost window
// in the active root window becomes the front of the list.
- for (size_t i = 0; i < wm::kSwitchableWindowContainerIdsLength; ++i)
- AddTrackedWindows(active_root, wm::kSwitchableWindowContainerIds[i],
- &windows);
+ for (size_t i = 0; i < wm::kSwitchableWindowContainerIdsLength; ++i) {
+ AddTrackedWindows(WmWindow::Get(active_root),
+ wm::kSwitchableWindowContainerIds[i], &windows);
+ }
// Removes unfocusable windows.
std::vector<WmWindow*>::iterator itr = windows.begin();
« no previous file with comments | « ash/wm/immersive_context_ash.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698