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

Side by Side Diff: ash/test/ash_test_impl_aura.cc

Issue 2355063002: Separate ash::test::DisplayManagerTestApi from ash (Closed)
Patch Set: review comment Created 4 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
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | ash/test/display_manager_test_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | ash/test/display_manager_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698