OLD | NEW |
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/workspace_manager2.h" | 5 #include "ash/wm/workspace/workspace_manager2.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 WorkspaceWindowState WorkspaceManager2::GetWindowState() const { | 162 WorkspaceWindowState WorkspaceManager2::GetWindowState() const { |
163 if (!shelf_) | 163 if (!shelf_) |
164 return WORKSPACE_WINDOW_STATE_DEFAULT; | 164 return WORKSPACE_WINDOW_STATE_DEFAULT; |
165 | 165 |
166 const gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); | 166 const gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); |
167 const Window::Windows& windows(active_workspace_->window()->children()); | 167 const Window::Windows& windows(active_workspace_->window()->children()); |
168 bool window_overlaps_launcher = false; | 168 bool window_overlaps_launcher = false; |
169 bool has_maximized_window = false; | 169 bool has_maximized_window = false; |
170 for (Window::Windows::const_iterator i = windows.begin(); | 170 for (Window::Windows::const_iterator i = windows.begin(); |
171 i != windows.end(); ++i) { | 171 i != windows.end(); ++i) { |
| 172 if (GetIgnoredByShelf(*i)) |
| 173 continue; |
172 ui::Layer* layer = (*i)->layer(); | 174 ui::Layer* layer = (*i)->layer(); |
173 if (!layer->GetTargetVisibility() || layer->GetTargetOpacity() == 0.0f) | 175 if (!layer->GetTargetVisibility() || layer->GetTargetOpacity() == 0.0f) |
174 continue; | 176 continue; |
175 if (wm::IsWindowMaximized(*i)) { | 177 if (wm::IsWindowMaximized(*i)) { |
176 // An untracked window may still be fullscreen so we keep iterating when | 178 // An untracked window may still be fullscreen so we keep iterating when |
177 // we hit a maximized window. | 179 // we hit a maximized window. |
178 has_maximized_window = true; | 180 has_maximized_window = true; |
179 } else if (wm::IsWindowFullscreen(*i)) { | 181 } else if (wm::IsWindowFullscreen(*i)) { |
180 return WORKSPACE_WINDOW_STATE_FULL_SCREEN; | 182 return WORKSPACE_WINDOW_STATE_FULL_SCREEN; |
181 } | 183 } |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 child, old_layer); | 494 child, old_layer); |
493 } else { | 495 } else { |
494 DCHECK(!old_layer); | 496 DCHECK(!old_layer); |
495 } | 497 } |
496 } | 498 } |
497 UpdateShelfVisibility(); | 499 UpdateShelfVisibility(); |
498 } | 500 } |
499 | 501 |
500 } // namespace internal | 502 } // namespace internal |
501 } // namespace ash | 503 } // namespace ash |
OLD | NEW |