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_manager.h" | 5 #include "ash/wm/workspace/workspace_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 if (!shelf_ || !active_workspace_) | 160 if (!shelf_ || !active_workspace_) |
161 return WORKSPACE_WINDOW_STATE_DEFAULT; | 161 return WORKSPACE_WINDOW_STATE_DEFAULT; |
162 | 162 |
163 // TODO: this code needs to be made multi-display aware. | 163 // TODO: this code needs to be made multi-display aware. |
164 gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); | 164 gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); |
165 const aura::Window::Windows& windows(contents_view_->children()); | 165 const aura::Window::Windows& windows(contents_view_->children()); |
166 bool window_overlaps_launcher = false; | 166 bool window_overlaps_launcher = false; |
167 bool has_maximized_window = false; | 167 bool has_maximized_window = false; |
168 for (aura::Window::Windows::const_iterator i = windows.begin(); | 168 for (aura::Window::Windows::const_iterator i = windows.begin(); |
169 i != windows.end(); ++i) { | 169 i != windows.end(); ++i) { |
| 170 gfx::Rect b = (*i)->bounds(); |
| 171 if (GetIgnoredByShelf(*i)) |
| 172 continue; |
170 ui::Layer* layer = (*i)->layer(); | 173 ui::Layer* layer = (*i)->layer(); |
171 if (!layer->GetTargetVisibility() || layer->GetTargetOpacity() == 0.0f) | 174 if (!layer->GetTargetVisibility() || layer->GetTargetOpacity() == 0.0f) |
172 continue; | 175 continue; |
173 if (wm::IsWindowMaximized(*i)) { | 176 if (wm::IsWindowMaximized(*i)) { |
174 // An untracked window may still be fullscreen so we keep iterating when | 177 // An untracked window may still be fullscreen so we keep iterating when |
175 // we hit a maximized window. | 178 // we hit a maximized window. |
176 has_maximized_window = true; | 179 has_maximized_window = true; |
177 } else if (wm::IsWindowFullscreen(*i)) { | 180 } else if (wm::IsWindowFullscreen(*i)) { |
178 return WORKSPACE_WINDOW_STATE_FULL_SCREEN; | 181 return WORKSPACE_WINDOW_STATE_FULL_SCREEN; |
179 } | 182 } |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 return workspace; | 367 return workspace; |
365 } | 368 } |
366 | 369 |
367 void WorkspaceManager::CleanupWorkspace(Workspace* workspace) { | 370 void WorkspaceManager::CleanupWorkspace(Workspace* workspace) { |
368 if (workspace->type() != Workspace::TYPE_MANAGED && workspace->is_empty()) | 371 if (workspace->type() != Workspace::TYPE_MANAGED && workspace->is_empty()) |
369 delete workspace; | 372 delete workspace; |
370 } | 373 } |
371 | 374 |
372 } // namespace internal | 375 } // namespace internal |
373 } // namespace ash | 376 } // namespace ash |
OLD | NEW |