high_contrast_controller.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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
  3. // found in the LICENSE file.
  4. #ifndef ASH_HIGH_CONTRAST_HIGH_CONTRAST_CONTROLLER_H_
  5. #define ASH_HIGH_CONTRAST_HIGH_CONTRAST_CONTROLLER_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/shell_observer.h"
  8. namespace aura {
  9. class Window;
  10. }
  11. namespace ash {
  12. // Controls the accessibility high contrast mode for classic ash.
  13. class ASH_EXPORT HighContrastController : public ShellObserver {
  14. public:
  15. HighContrastController();
  16. HighContrastController(const HighContrastController&) = delete;
  17. HighContrastController& operator=(const HighContrastController&) = delete;
  18. ~HighContrastController() override;
  19. // Set high contrast mode and update all available displays.
  20. void SetEnabled(bool enabled);
  21. // ShellObserver:
  22. void OnRootWindowAdded(aura::Window* root_window) override;
  23. private:
  24. // Update high contrast mode on the passed display.
  25. void UpdateDisplay(aura::Window* root_window);
  26. // Indicates if the high contrast mode is enabled or disabled.
  27. bool enabled_;
  28. };
  29. } // namespace ash
  30. #endif // ASH_HIGH_CONTRAST_HIGH_CONTRAST_CONTROLLER_H_