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

Side by Side Diff: ash/wm/workspace/workspace_manager.cc

Issue 10675011: Rename the remaining usage of Monitor to Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/workspace/snap_sizer.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | 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/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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 void WorkspaceManager::UpdateShelfVisibility() { 135 void WorkspaceManager::UpdateShelfVisibility() {
136 if (shelf_) 136 if (shelf_)
137 shelf_->UpdateVisibilityState(); 137 shelf_->UpdateVisibilityState();
138 } 138 }
139 139
140 WorkspaceManager::WindowState WorkspaceManager::GetWindowState() { 140 WorkspaceManager::WindowState WorkspaceManager::GetWindowState() {
141 if (!shelf_ || !active_workspace_) 141 if (!shelf_ || !active_workspace_)
142 return WINDOW_STATE_DEFAULT; 142 return WINDOW_STATE_DEFAULT;
143 143
144 // TODO: this code needs to be made multi-monitor aware. 144 // TODO: this code needs to be made multi-display aware.
145 gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); 145 gfx::Rect shelf_bounds(shelf_->GetIdealBounds());
146 const aura::Window::Windows& windows(contents_view_->children()); 146 const aura::Window::Windows& windows(contents_view_->children());
147 bool window_overlaps_launcher = false; 147 bool window_overlaps_launcher = false;
148 bool has_maximized_window = false; 148 bool has_maximized_window = false;
149 for (aura::Window::Windows::const_iterator i = windows.begin(); 149 for (aura::Window::Windows::const_iterator i = windows.begin();
150 i != windows.end(); ++i) { 150 i != windows.end(); ++i) {
151 ui::Layer* layer = (*i)->layer(); 151 ui::Layer* layer = (*i)->layer();
152 if (!layer->GetTargetVisibility() || layer->GetTargetOpacity() == 0.0f) 152 if (!layer->GetTargetVisibility() || layer->GetTargetOpacity() == 0.0f)
153 continue; 153 continue;
154 if (wm::IsWindowMaximized(*i)) { 154 if (wm::IsWindowMaximized(*i)) {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 return workspace; 341 return workspace;
342 } 342 }
343 343
344 void WorkspaceManager::CleanupWorkspace(Workspace* workspace) { 344 void WorkspaceManager::CleanupWorkspace(Workspace* workspace) {
345 if (workspace->type() != Workspace::TYPE_MANAGED && workspace->is_empty()) 345 if (workspace->type() != Workspace::TYPE_MANAGED && workspace->is_empty())
346 delete workspace; 346 delete workspace;
347 } 347 }
348 348
349 } // namespace internal 349 } // namespace internal
350 } // namespace ash 350 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/snap_sizer.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698