Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
|
James Cook
2016/09/28 01:19:42
super nit: 2016
sky
2016/09/28 17:31:45
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ash/common/test/ash_test.h" | |
| 6 | |
| 7 #include "ash/common/test/ash_test_impl.h" | |
| 8 #include "ash/common/wm_window.h" | |
| 9 #include "ui/display/display.h" | |
| 10 | |
| 11 namespace ash { | |
| 12 | |
| 13 WindowOwner::WindowOwner(WmWindow* window) : window_(window) {} | |
| 14 | |
| 15 WindowOwner::~WindowOwner() { | |
| 16 window_->Destroy(); | |
| 17 } | |
| 18 | |
| 19 AshTest::AshTest() : test_impl_(AshTestImpl::Create()) {} | |
| 20 | |
| 21 AshTest::~AshTest() {} | |
| 22 | |
| 23 bool AshTest::SupportsMultipleDisplays() const { | |
| 24 return test_impl_->SupportsMultipleDisplays(); | |
| 25 } | |
| 26 | |
| 27 void AshTest::UpdateDisplay(const std::string& display_spec) { | |
| 28 return test_impl_->UpdateDisplay(display_spec); | |
| 29 } | |
| 30 | |
| 31 std::unique_ptr<WindowOwner> AshTest::CreateTestWindow(const gfx::Rect& bounds, | |
| 32 ui::wm::WindowType type, | |
| 33 int shell_window_id) { | |
| 34 return test_impl_->CreateTestWindow(bounds, type, shell_window_id); | |
| 35 } | |
| 36 | |
| 37 display::Display AshTest::GetSecondaryDisplay() { | |
| 38 return test_impl_->GetSecondaryDisplay(); | |
| 39 } | |
| 40 | |
| 41 bool AshTest::SetSecondaryDisplayPlacement( | |
| 42 display::DisplayPlacement::Position position, | |
| 43 int offset) { | |
| 44 return test_impl_->SetSecondaryDisplayPlacement(position, offset); | |
| 45 } | |
| 46 | |
| 47 void AshTest::ConfigureWidgetInitParamsForDisplay( | |
| 48 WmWindow* window, | |
| 49 views::Widget::InitParams* init_params) { | |
| 50 test_impl_->ConfigureWidgetInitParamsForDisplay(window, init_params); | |
| 51 } | |
| 52 | |
| 53 void AshTest::SetUp() { | |
| 54 test_impl_->SetUp(); | |
| 55 } | |
| 56 | |
| 57 void AshTest::TearDown() { | |
| 58 test_impl_->TearDown(); | |
| 59 } | |
| 60 | |
| 61 } // namespace ash | |
| OLD | NEW |