blob: 7f274f8328d052d0abc5526bbd97a8d7568bac05 [file] [log] [blame]
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/display/screen_orientation_controller_test_api.h"
#include "ash/display/screen_orientation_controller.h"
namespace ash {
ScreenOrientationControllerTestApi::ScreenOrientationControllerTestApi(
ScreenOrientationController* controller)
: controller_(controller) {}
void ScreenOrientationControllerTestApi::SetDisplayRotation(
display::Display::Rotation rotation,
display::Display::RotationSource source,
DisplayConfigurationController::RotationAnimation mode) {
controller_->SetDisplayRotation(rotation, source, mode);
}
void ScreenOrientationControllerTestApi::SetRotationLocked(bool locked) {
controller_->SetRotationLockedInternal(locked);
}
chromeos::OrientationType
ScreenOrientationControllerTestApi::UserLockedOrientation() const {
return controller_->user_locked_orientation_;
}
chromeos::OrientationType
ScreenOrientationControllerTestApi::GetCurrentOrientation() const {
return controller_->GetCurrentOrientation();
}
void ScreenOrientationControllerTestApi::UpdateNaturalOrientation() {
controller_->UpdateNaturalOrientationForTest();
}
bool ScreenOrientationControllerTestApi::IsAutoRotationAllowed() const {
return controller_->IsAutoRotationAllowed();
}
} // namespace ash