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

Unified Diff: ash/wm/workspace_controller.cc

Issue 2967543003: collect windows from mru_list in workspace_controller. (Closed)
Patch Set: write down todo for test Created 3 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/shelf/shelf_layout_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace_controller.cc
diff --git a/ash/wm/workspace_controller.cc b/ash/wm/workspace_controller.cc
index 8017164f4d17a58adb380985af4a037694310665..fd34e8f39af3548740c908d3d4770e9b249ae1f5 100644
--- a/ash/wm/workspace_controller.cc
+++ b/ash/wm/workspace_controller.cc
@@ -9,8 +9,10 @@
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h"
#include "ash/shelf/shelf.h"
+#include "ash/shell.h"
#include "ash/shell_port.h"
#include "ash/wm/fullscreen_window_finder.h"
+#include "ash/wm/mru_window_tracker.h"
#include "ash/wm/window_state.h"
#include "ash/wm/wm_window_animations.h"
#include "ash/wm/workspace/backdrop_controller.h"
@@ -61,11 +63,11 @@ wm::WorkspaceWindowState WorkspaceController::GetWindowState() const {
const gfx::Rect shelf_bounds(Shelf::ForWindow(viewport_)->GetIdealBounds());
bool window_overlaps_launcher = false;
- // The default container may contain windows that may overlap the launcher
- // shelf and affect its transparency.
- aura::Window* container =
- viewport_->GetRootWindow()->GetChildById(kShellWindowId_DefaultContainer);
- for (aura::Window* window : container->children()) {
+ auto mru_list = Shell::Get()->mru_window_tracker()->BuildMruWindowList();
+
+ for (aura::Window* window : mru_list) {
+ if (window->GetRootWindow() != viewport_->GetRootWindow())
+ continue;
wm::WindowState* window_state = wm::GetWindowState(window);
if (window_state->ignored_by_shelf() ||
(window->layer() && !window->layer()->GetTargetVisibility())) {
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698