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

Side by Side Diff: ui/aura_shell/workspace/workspace_manager.cc

Issue 8771015: Rename Desktop->RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/aura_shell/workspace/workspace_manager.h" 5 #include "ui/aura_shell/workspace/workspace_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "ui/aura/desktop.h" 12 #include "ui/aura/root_window.h"
13 #include "ui/aura/screen_aura.h" 13 #include "ui/aura/screen_aura.h"
14 #include "ui/aura/window.h" 14 #include "ui/aura/window.h"
15 #include "ui/aura_shell/workspace/workspace.h" 15 #include "ui/aura_shell/workspace/workspace.h"
16 #include "ui/aura_shell/workspace/workspace_observer.h" 16 #include "ui/aura_shell/workspace/workspace_observer.h"
17 #include "ui/gfx/compositor/layer.h" 17 #include "ui/gfx/compositor/layer.h"
18 #include "ui/gfx/compositor/layer_animator.h" 18 #include "ui/gfx/compositor/layer_animator.h"
19 #include "ui/gfx/screen.h" 19 #include "ui/gfx/screen.h"
20 #include "ui/gfx/transform.h" 20 #include "ui/gfx/transform.h"
21 21
22 namespace { 22 namespace {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 UpdateContentsView(); 231 UpdateContentsView();
232 232
233 FOR_EACH_OBSERVER(WorkspaceObserver, observers_, 233 FOR_EACH_OBSERVER(WorkspaceObserver, observers_,
234 ActiveWorkspaceChanged(this, old)); 234 ActiveWorkspaceChanged(this, old));
235 } 235 }
236 236
237 gfx::Rect WorkspaceManager::GetWorkAreaBounds( 237 gfx::Rect WorkspaceManager::GetWorkAreaBounds(
238 const gfx::Rect& workspace_bounds) { 238 const gfx::Rect& workspace_bounds) {
239 gfx::Rect bounds = workspace_bounds; 239 gfx::Rect bounds = workspace_bounds;
240 bounds.Inset( 240 bounds.Inset(
241 aura::Desktop::GetInstance()->screen()->work_area_insets()); 241 aura::RootWindow::GetInstance()->screen()->work_area_insets());
242 return bounds; 242 return bounds;
243 } 243 }
244 244
245 // Returns the index of the workspace that contains the |window|. 245 // Returns the index of the workspace that contains the |window|.
246 int WorkspaceManager::GetWorkspaceIndexContaining(aura::Window* window) const { 246 int WorkspaceManager::GetWorkspaceIndexContaining(aura::Window* window) const {
247 for (Workspaces::const_iterator i = workspaces_.begin(); 247 for (Workspaces::const_iterator i = workspaces_.begin();
248 i != workspaces_.end(); 248 i != workspaces_.end();
249 ++i) { 249 ++i) {
250 if ((*i)->Contains(window)) 250 if ((*i)->Contains(window))
251 return i - workspaces_.begin(); 251 return i - workspaces_.begin();
(...skipping 15 matching lines...) Expand all
267 ui::Transform transform; 267 ui::Transform transform;
268 transform.SetTranslateX(-active_workspace_->bounds().x()); 268 transform.SetTranslateX(-active_workspace_->bounds().x());
269 ui::LayerAnimator::ScopedSettings settings( 269 ui::LayerAnimator::ScopedSettings settings(
270 contents_view_->layer()->GetAnimator()); 270 contents_view_->layer()->GetAnimator());
271 contents_view_->SetTransform(transform); 271 contents_view_->SetTransform(transform);
272 } 272 }
273 } 273 }
274 274
275 } // namespace internal 275 } // namespace internal
276 } // namespace aura_shell 276 } // namespace aura_shell
OLDNEW
« no previous file with comments | « ui/aura_shell/workspace/workspace.cc ('k') | ui/aura_shell/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698