| 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/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 } | 195 } |
| 196 | 196 |
| 197 ui::test::EventGenerator& AshTestBase::GetEventGenerator() { | 197 ui::test::EventGenerator& AshTestBase::GetEventGenerator() { |
| 198 if (!event_generator_) { | 198 if (!event_generator_) { |
| 199 event_generator_.reset( | 199 event_generator_.reset( |
| 200 new ui::test::EventGenerator(new AshEventGeneratorDelegate())); | 200 new ui::test::EventGenerator(new AshEventGeneratorDelegate())); |
| 201 } | 201 } |
| 202 return *event_generator_.get(); | 202 return *event_generator_.get(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 gfx::Display::Rotation AshTestBase::GetActiveDisplayRotation(int64 id) { | |
| 206 return Shell::GetInstance() | |
| 207 ->display_manager() | |
| 208 ->GetDisplayInfo(id) | |
| 209 .GetActiveRotation(); | |
| 210 } | |
| 211 | |
| 212 gfx::Display::Rotation AshTestBase::GetCurrentInternalDisplayRotation() { | |
| 213 return GetActiveDisplayRotation(gfx::Display::InternalDisplayId()); | |
| 214 } | |
| 215 | |
| 216 bool AshTestBase::SupportsMultipleDisplays() { | 205 bool AshTestBase::SupportsMultipleDisplays() { |
| 217 return AshTestHelper::SupportsMultipleDisplays(); | 206 return AshTestHelper::SupportsMultipleDisplays(); |
| 218 } | 207 } |
| 219 | 208 |
| 220 bool AshTestBase::SupportsHostWindowResize() { | 209 bool AshTestBase::SupportsHostWindowResize() { |
| 221 return AshTestHelper::SupportsHostWindowResize(); | 210 return AshTestHelper::SupportsHostWindowResize(); |
| 222 } | 211 } |
| 223 | 212 |
| 224 void AshTestBase::UpdateDisplay(const std::string& display_specs) { | 213 void AshTestBase::UpdateDisplay(const std::string& display_specs) { |
| 225 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); | 214 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 346 |
| 358 void AshTestBase::UnblockUserSession() { | 347 void AshTestBase::UnblockUserSession() { |
| 359 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 348 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
| 360 SetSessionStarted(true); | 349 SetSessionStarted(true); |
| 361 SetUserAddingScreenRunning(false); | 350 SetUserAddingScreenRunning(false); |
| 362 } | 351 } |
| 363 | 352 |
| 364 | 353 |
| 365 } // namespace test | 354 } // namespace test |
| 366 } // namespace ash | 355 } // namespace ash |
| OLD | NEW |