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 |
205 bool AshTestBase::SupportsMultipleDisplays() { | 216 bool AshTestBase::SupportsMultipleDisplays() { |
206 return AshTestHelper::SupportsMultipleDisplays(); | 217 return AshTestHelper::SupportsMultipleDisplays(); |
207 } | 218 } |
208 | 219 |
209 bool AshTestBase::SupportsHostWindowResize() { | 220 bool AshTestBase::SupportsHostWindowResize() { |
210 return AshTestHelper::SupportsHostWindowResize(); | 221 return AshTestHelper::SupportsHostWindowResize(); |
211 } | 222 } |
212 | 223 |
213 void AshTestBase::UpdateDisplay(const std::string& display_specs) { | 224 void AshTestBase::UpdateDisplay(const std::string& display_specs) { |
214 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); | 225 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 357 |
347 void AshTestBase::UnblockUserSession() { | 358 void AshTestBase::UnblockUserSession() { |
348 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 359 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
349 SetSessionStarted(true); | 360 SetSessionStarted(true); |
350 SetUserAddingScreenRunning(false); | 361 SetUserAddingScreenRunning(false); |
351 } | 362 } |
352 | 363 |
353 | 364 |
354 } // namespace test | 365 } // namespace test |
355 } // namespace ash | 366 } // namespace ash |
OLD | NEW |