accessibility_delegate.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_ACCESSIBILITY_ACCESSIBILITY_DELEGATE_H_
  5. #define ASH_ACCESSIBILITY_ACCESSIBILITY_DELEGATE_H_
  6. #include "ash/ash_export.h"
  7. namespace ash {
  8. // A delegate class to control and query accessibility features.
  9. //
  10. // NOTE: Methods in this class are migrating to AccessibilityController to
  11. // support mash (because ash is in a separate process and cannot call back into
  12. // chrome). Add new methods there, not here.
  13. class ASH_EXPORT AccessibilityDelegate {
  14. public:
  15. virtual ~AccessibilityDelegate() {}
  16. // Invoked to enable the screen magnifier.
  17. virtual void SetMagnifierEnabled(bool enabled) = 0;
  18. // Returns true if the screen magnifier is enabled.
  19. virtual bool IsMagnifierEnabled() const = 0;
  20. // Returns true when the accessibility menu should be shown.
  21. virtual bool ShouldShowAccessibilityMenu() const = 0;
  22. // Saves the zoom scale of the full screen magnifier.
  23. virtual void SaveScreenMagnifierScale(double scale) = 0;
  24. // Gets a saved value of the zoom scale of full screen magnifier. If a value
  25. // is not saved, return a negative value.
  26. virtual double GetSavedScreenMagnifierScale() = 0;
  27. // NOTE: Prefer adding methods to AccessibilityController, see class comment.
  28. };
  29. } // namespace ash
  30. #endif // ASH_ACCESSIBILITY_ACCESSIBILITY_DELEGATE_H_