OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_impl_aura.h" | 5 #include "ash/test/ash_test_impl_aura.h" |
6 | 6 |
7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
8 #include "ash/common/test/ash_test.h" | 8 #include "ash/common/test/ash_test.h" |
9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 std::unique_ptr<WindowOwner> AshTestImplAura::CreateTestWindow( | 60 std::unique_ptr<WindowOwner> AshTestImplAura::CreateTestWindow( |
61 const gfx::Rect& bounds_in_screen, | 61 const gfx::Rect& bounds_in_screen, |
62 ui::wm::WindowType type, | 62 ui::wm::WindowType type, |
63 int shell_window_id) { | 63 int shell_window_id) { |
64 return base::MakeUnique<WindowOwner>(WmWindowAura::Get( | 64 return base::MakeUnique<WindowOwner>(WmWindowAura::Get( |
65 ash_test_base_->CreateTestWindowInShellWithDelegateAndType( | 65 ash_test_base_->CreateTestWindowInShellWithDelegateAndType( |
66 nullptr, type, shell_window_id, bounds_in_screen))); | 66 nullptr, type, shell_window_id, bounds_in_screen))); |
67 } | 67 } |
68 | 68 |
69 display::Display AshTestImplAura::GetSecondaryDisplay() { | 69 display::Display AshTestImplAura::GetSecondaryDisplay() { |
70 return ScreenUtil::GetSecondaryDisplay(); | 70 return Shell::GetInstance()->display_manager()->GetSecondaryDisplay(); |
71 } | 71 } |
72 | 72 |
73 bool AshTestImplAura::SetSecondaryDisplayPlacement( | 73 bool AshTestImplAura::SetSecondaryDisplayPlacement( |
74 display::DisplayPlacement::Position position, | 74 display::DisplayPlacement::Position position, |
75 int offset) { | 75 int offset) { |
76 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( | 76 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( |
77 test::CreateDisplayLayout(position, 0)); | 77 test::CreateDisplayLayout(Shell::GetInstance()->display_manager(), |
| 78 position, 0)); |
78 return true; | 79 return true; |
79 } | 80 } |
80 | 81 |
81 // static | 82 // static |
82 std::unique_ptr<AshTestImpl> AshTestImpl::Create() { | 83 std::unique_ptr<AshTestImpl> AshTestImpl::Create() { |
83 return base::MakeUnique<AshTestImplAura>(); | 84 return base::MakeUnique<AshTestImplAura>(); |
84 } | 85 } |
85 | 86 |
86 } // namespace ash | 87 } // namespace ash |
OLD | NEW |