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

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

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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
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_manager2.h" 5 #include "ash/wm/workspace/workspace_manager2.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 aura::Window* GetViewport() { 67 aura::Window* GetViewport() {
68 return Shell::GetContainer(Shell::GetPrimaryRootWindow(), 68 return Shell::GetContainer(Shell::GetPrimaryRootWindow(),
69 kShellWindowId_DefaultContainer); 69 kShellWindowId_DefaultContainer);
70 } 70 }
71 71
72 const std::vector<Workspace2*>& workspaces() const { 72 const std::vector<Workspace2*>& workspaces() const {
73 return manager_->workspaces_; 73 return manager_->workspaces_;
74 } 74 }
75 75
76 gfx::Rect GetFullscreenBounds(aura::Window* window) { 76 gfx::Rect GetFullscreenBounds(aura::Window* window) {
77 return gfx::Screen::GetDisplayNearestWindow(window).bounds(); 77 return Shell::GetScreen()->GetDisplayNearestWindow(window).bounds();
78 } 78 }
79 79
80 Workspace2* active_workspace() { 80 Workspace2* active_workspace() {
81 return manager_->active_workspace_; 81 return manager_->active_workspace_;
82 } 82 }
83 83
84 Workspace2* FindBy(aura::Window* window) const { 84 Workspace2* FindBy(aura::Window* window) const {
85 return manager_->FindBy(window); 85 return manager_->FindBy(window);
86 } 86 }
87 87
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 EXPECT_EQ(w1->parent(), w2->parent()); 1100 EXPECT_EQ(w1->parent(), w2->parent());
1101 ASSERT_EQ("0 M2 active=1", StateString()); 1101 ASSERT_EQ("0 M2 active=1", StateString());
1102 1102
1103 // Activate |w1|, should result in dropping |w2| to the desktop. 1103 // Activate |w1|, should result in dropping |w2| to the desktop.
1104 wm::ActivateWindow(w1.get()); 1104 wm::ActivateWindow(w1.get());
1105 ASSERT_EQ("1 M1 active=1", StateString()); 1105 ASSERT_EQ("1 M1 active=1", StateString());
1106 } 1106 }
1107 1107
1108 } // namespace internal 1108 } // namespace internal
1109 } // namespace ash 1109 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_event_handler_unittest.cc ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698