brightness_controller_chromeos.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2013 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_SYSTEM_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_
  5. #define ASH_SYSTEM_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/system/brightness_control_delegate.h"
  8. #include "base/compiler_specific.h"
  9. #include "third_party/abseil-cpp/absl/types/optional.h"
  10. namespace ash {
  11. namespace system {
  12. // A class which controls brightness when F6, F7 or a multimedia key for
  13. // brightness is pressed.
  14. class ASH_EXPORT BrightnessControllerChromeos
  15. : public ash::BrightnessControlDelegate {
  16. public:
  17. BrightnessControllerChromeos() {}
  18. BrightnessControllerChromeos(const BrightnessControllerChromeos&) = delete;
  19. BrightnessControllerChromeos& operator=(const BrightnessControllerChromeos&) =
  20. delete;
  21. ~BrightnessControllerChromeos() override {}
  22. // Overridden from ash::BrightnessControlDelegate:
  23. void HandleBrightnessDown(const ui::Accelerator& accelerator) override;
  24. void HandleBrightnessUp(const ui::Accelerator& accelerator) override;
  25. void SetBrightnessPercent(double percent, bool gradual) override;
  26. void GetBrightnessPercent(
  27. base::OnceCallback<void(absl::optional<double>)> callback) override;
  28. };
  29. } // namespace system
  30. } // namespace ash
  31. #endif // ASH_SYSTEM_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_