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

Unified Diff: ash/common/wm/window_positioner.cc

Issue 2041423002: Moves MruWindowTracker to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_mru_window_tracker
Patch Set: wm Created 4 years, 6 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/aura/wm_shell_aura.cc ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/window_positioner.cc
diff --git a/ash/common/wm/window_positioner.cc b/ash/common/wm/window_positioner.cc
index 1a9c4914e1c2ff805ed7b19abb7a65ec374f3c48..cb00c9b42fadaed153b14825dfa973ac5d8602c5 100644
--- a/ash/common/wm/window_positioner.cc
+++ b/ash/common/wm/window_positioner.cc
@@ -4,6 +4,7 @@
#include "ash/common/wm/window_positioner.h"
+#include "ash/common/wm/mru_window_tracker.h"
#include "ash/common/wm/window_positioning_utils.h"
#include "ash/common/wm/window_state.h"
#include "ash/common/wm/wm_screen_util.h"
@@ -161,8 +162,9 @@ WmWindow* GetReferenceWindow(const WmWindow* root_window,
active = NULL;
// Get a list of all windows.
- const std::vector<WmWindow*> windows =
- root_window->GetShell()->GetMruWindowListIgnoreModals();
+ const std::vector<WmWindow*> windows = root_window->GetShell()
+ ->GetMruWindowTracker()
+ ->BuildWindowListIgnoreModal();
if (windows.empty())
return nullptr;
@@ -475,7 +477,8 @@ gfx::Rect WindowPositioner::NormalPopupPosition(const gfx::Rect& old_pos,
gfx::Rect WindowPositioner::SmartPopupPosition(const gfx::Rect& old_pos,
const gfx::Rect& work_area,
int grid) {
- const std::vector<WmWindow*> windows = shell_->GetMruWindowListIgnoreModals();
+ const std::vector<WmWindow*> windows =
+ shell_->GetMruWindowTracker()->BuildWindowListIgnoreModal();
std::vector<const gfx::Rect*> regions;
// Process the window list and check if we can bail immediately.
« no previous file with comments | « ash/aura/wm_shell_aura.cc ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698