| 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 "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 Loading... |
| 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::GetAshScreen()->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 Loading... |
| 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 |
| OLD | NEW |