| 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/test/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/common/test/test_session_state_delegate.h" | 10 #include "ash/common/test/test_session_state_delegate.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 bool AshTestBase::SupportsMultipleDisplays() { | 210 bool AshTestBase::SupportsMultipleDisplays() { |
| 211 return AshTestHelper::SupportsMultipleDisplays(); | 211 return AshTestHelper::SupportsMultipleDisplays(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 // static | 214 // static |
| 215 void AshTestBase::UpdateDisplay(const std::string& display_specs) { | 215 void AshTestBase::UpdateDisplay(const std::string& display_specs) { |
| 216 display::test::DisplayManagerTestApi(Shell::GetInstance()->display_manager()) | 216 display::test::DisplayManagerTestApi(Shell::GetInstance()->display_manager()) |
| 217 .UpdateDisplay(display_specs); | 217 .UpdateDisplay(display_specs); |
| 218 } | 218 } |
| 219 | 219 |
| 220 int64_t AshTestBase::SetFirstDisplayAsInternalDisplay() { |
| 221 return display::test::DisplayManagerTestApi( |
| 222 Shell::GetInstance()->display_manager()) |
| 223 .SetFirstDisplayAsInternalDisplay(); |
| 224 } |
| 225 |
| 220 aura::Window* AshTestBase::CurrentContext() { | 226 aura::Window* AshTestBase::CurrentContext() { |
| 221 return ash_test_helper_->CurrentContext(); | 227 return ash_test_helper_->CurrentContext(); |
| 222 } | 228 } |
| 223 | 229 |
| 224 // static | 230 // static |
| 225 std::unique_ptr<views::Widget> AshTestBase::CreateTestWidget( | 231 std::unique_ptr<views::Widget> AshTestBase::CreateTestWidget( |
| 226 views::WidgetDelegate* delegate, | 232 views::WidgetDelegate* delegate, |
| 227 int container_id, | 233 int container_id, |
| 228 const gfx::Rect& bounds) { | 234 const gfx::Rect& bounds) { |
| 229 std::unique_ptr<views::Widget> widget(new views::Widget); | 235 std::unique_ptr<views::Widget> widget(new views::Widget); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 403 |
| 398 void AshTestBase::SwapPrimaryDisplay() { | 404 void AshTestBase::SwapPrimaryDisplay() { |
| 399 if (display::Screen::GetScreen()->GetNumDisplays() <= 1) | 405 if (display::Screen::GetScreen()->GetNumDisplays() <= 1) |
| 400 return; | 406 return; |
| 401 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId( | 407 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId( |
| 402 display_manager()->GetSecondaryDisplay().id()); | 408 display_manager()->GetSecondaryDisplay().id()); |
| 403 } | 409 } |
| 404 | 410 |
| 405 } // namespace test | 411 } // namespace test |
| 406 } // namespace ash | 412 } // namespace ash |
| OLD | NEW |