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

Side by Side Diff: ash/wm/workspace_controller.cc

Issue 2985453003: fix shelf color with modal dialog. (Closed)
Patch Set: fix tests Created 3 years, 4 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 unified diff | Download patch
« no previous file with comments | « ash/wm/focus_rules.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/workspace_controller.h" 5 #include "ash/wm/workspace_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 wm::WorkspaceWindowState WorkspaceController::GetWindowState() const { 56 wm::WorkspaceWindowState WorkspaceController::GetWindowState() const {
57 if (!viewport_) 57 if (!viewport_)
58 return wm::WORKSPACE_WINDOW_STATE_DEFAULT; 58 return wm::WORKSPACE_WINDOW_STATE_DEFAULT;
59 59
60 const aura::Window* fullscreen = wm::GetWindowForFullscreenMode(viewport_); 60 const aura::Window* fullscreen = wm::GetWindowForFullscreenMode(viewport_);
61 if (fullscreen && !wm::GetWindowState(fullscreen)->ignored_by_shelf()) 61 if (fullscreen && !wm::GetWindowState(fullscreen)->ignored_by_shelf())
62 return wm::WORKSPACE_WINDOW_STATE_FULL_SCREEN; 62 return wm::WORKSPACE_WINDOW_STATE_FULL_SCREEN;
63 63
64 const gfx::Rect shelf_bounds(Shelf::ForWindow(viewport_)->GetIdealBounds()); 64 const gfx::Rect shelf_bounds(Shelf::ForWindow(viewport_)->GetIdealBounds());
65 bool window_overlaps_launcher = false; 65 bool window_overlaps_launcher = false;
66 auto mru_list = Shell::Get()->mru_window_tracker()->BuildMruWindowList(); 66 auto mru_list =
67 Shell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal();
67 68
68 for (aura::Window* window : mru_list) { 69 for (aura::Window* window : mru_list) {
69 if (window->GetRootWindow() != viewport_->GetRootWindow()) 70 if (window->GetRootWindow() != viewport_->GetRootWindow())
70 continue; 71 continue;
71 wm::WindowState* window_state = wm::GetWindowState(window); 72 wm::WindowState* window_state = wm::GetWindowState(window);
72 if (window_state->ignored_by_shelf() || 73 if (window_state->ignored_by_shelf() ||
73 (window->layer() && !window->layer()->GetTargetVisibility())) { 74 (window->layer() && !window->layer()->GetTargetVisibility())) {
74 continue; 75 continue;
75 } 76 }
76 if (window_state->IsMaximized()) 77 if (window_state->IsMaximized())
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void WorkspaceController::OnWindowDestroying(aura::Window* window) { 120 void WorkspaceController::OnWindowDestroying(aura::Window* window) {
120 DCHECK_EQ(window, viewport_); 121 DCHECK_EQ(window, viewport_);
121 viewport_->RemoveObserver(this); 122 viewport_->RemoveObserver(this);
122 viewport_ = nullptr; 123 viewport_ = nullptr;
123 // Destroy |event_handler_| too as it depends upon |window|. 124 // Destroy |event_handler_| too as it depends upon |window|.
124 event_handler_.reset(); 125 event_handler_.reset();
125 layout_manager_ = nullptr; 126 layout_manager_ = nullptr;
126 } 127 }
127 128
128 } // namespace ash 129 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/focus_rules.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698