12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- // Copyright 2018 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- #ifndef ASH_SYSTEM_ROTATION_ROTATION_LOCK_FEATURE_POD_CONTROLLER_H_
- #define ASH_SYSTEM_ROTATION_ROTATION_LOCK_FEATURE_POD_CONTROLLER_H_
- #include "ash/ash_export.h"
- #include "ash/display/screen_orientation_controller.h"
- #include "ash/public/cpp/tablet_mode_observer.h"
- #include "ash/system/unified/feature_pod_controller_base.h"
- namespace ash {
- // Controller of a feature pod button that toggles rotation lock mode.
- class ASH_EXPORT RotationLockFeaturePodController
- : public FeaturePodControllerBase,
- public TabletModeObserver,
- public ScreenOrientationController::Observer {
- public:
- RotationLockFeaturePodController();
- RotationLockFeaturePodController(const RotationLockFeaturePodController&) =
- delete;
- RotationLockFeaturePodController& operator=(
- const RotationLockFeaturePodController&) = delete;
- ~RotationLockFeaturePodController() override;
- // FeaturePodControllerBase:
- FeaturePodButton* CreateButton() override;
- void OnIconPressed() override;
- SystemTrayItemUmaType GetUmaType() const override;
- // TabletModeObserver:
- void OnTabletPhysicalStateChanged() override;
- // ScreenOrientationController::Observer:
- void OnUserRotationLockChanged() override;
- private:
- void UpdateButton();
- FeaturePodButton* button_ = nullptr;
- };
- } // namespace ash
- #endif // ASH_SYSTEM_ROTATION_ROTATION_LOCK_FEATURE_POD_CONTROLLER_H_
|