screen_orientation_controller_test_api.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_DISPLAY_SCREEN_ORIENTATION_CONTROLLER_TEST_API_H_
  5. #define ASH_DISPLAY_SCREEN_ORIENTATION_CONTROLLER_TEST_API_H_
  6. #include "ash/display/display_configuration_controller.h"
  7. #include "chromeos/ui/base/display_util.h"
  8. #include "ui/display/display.h"
  9. namespace ash {
  10. class ScreenOrientationController;
  11. class ScreenOrientationControllerTestApi {
  12. public:
  13. explicit ScreenOrientationControllerTestApi(
  14. ScreenOrientationController* controller);
  15. ScreenOrientationControllerTestApi(
  16. const ScreenOrientationControllerTestApi&) = delete;
  17. ScreenOrientationControllerTestApi& operator=(
  18. const ScreenOrientationControllerTestApi&) = delete;
  19. void SetDisplayRotation(
  20. display::Display::Rotation rotation,
  21. display::Display::RotationSource source,
  22. DisplayConfigurationController::RotationAnimation mode =
  23. DisplayConfigurationController::ANIMATION_ASYNC);
  24. void SetRotationLocked(bool rotation_locked);
  25. chromeos::OrientationType UserLockedOrientation() const;
  26. chromeos::OrientationType GetCurrentOrientation() const;
  27. void UpdateNaturalOrientation();
  28. bool IsAutoRotationAllowed() const;
  29. private:
  30. ScreenOrientationController* controller_;
  31. };
  32. } // namespace ash
  33. #endif // ASH_DISPLAY_SCREEN_ORIENTATION_CONTROLLER_TEST_API_H_