| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 8 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| 11 | 11 |
| 12 // MagnificationManager controls the full screen magnifier from chrome-browser | 12 // MagnificationManager controls the full screen magnifier from chrome-browser |
| 13 // side (not ash side). | 13 // side (not ash side). |
| 14 // | 14 // |
| 15 // MagnificationManager does: | 15 // MagnificationManager does: |
| 16 // - Watch logged-in. Changes the behavior between the login screen and user | 16 // - Watch logged-in. Changes the behavior between the login screen and user |
| 17 // desktop. | 17 // desktop. |
| 18 // - Watch change of the pref. When the pref changes, the setting of the | 18 // - Watch change of the pref. When the pref changes, the setting of the |
| 19 // magnifier will interlock with it. | 19 // magnifier will interlock with it. |
| 20 | 20 |
| 21 class MagnificationManager { | 21 class MagnificationManager { |
| 22 public: | 22 public: |
| 23 // Creates an instance of MagnificationManager. This should be called once, | 23 // Creates an instance of MagnificationManager. This should be called once, |
| 24 // Returns the existing instance. If there is no instance, creates one. | 24 // Returns the existing instance. If there is no instance, creates one. |
| 25 // because only one instance should exist at the same time. | 25 // because only one instance should exist at the same time. |
| 26 static void Initialize(); | 26 static void Initialize(); |
| 27 |
| 27 // Deletes the existing instance of MagnificationManager. | 28 // Deletes the existing instance of MagnificationManager. |
| 28 static void Shutdown(); | 29 static void Shutdown(); |
| 30 |
| 29 // Returns the existing instance. If there is no instance, returns NULL. | 31 // Returns the existing instance. If there is no instance, returns NULL. |
| 30 static MagnificationManager* Get(); | 32 static MagnificationManager* Get(); |
| 31 | 33 |
| 34 // Returns if the screen magnifier is enabled. |
| 35 virtual bool IsMagnifierEnabled() const = 0; |
| 36 |
| 32 // Returns the current type of the screen magnifier. | 37 // Returns the current type of the screen magnifier. |
| 33 virtual ash::MagnifierType GetMagnifierType() = 0; | 38 virtual ash::MagnifierType GetMagnifierType() const = 0; |
| 39 |
| 40 // Enables the screen magnifier. |
| 41 virtual void SetMagnifierEnabled(bool enabled) = 0; |
| 42 |
| 34 // Changes the type of the screen magnifier. | 43 // Changes the type of the screen magnifier. |
| 35 virtual void SetMagnifier(ash::MagnifierType type) = 0; | 44 virtual void SetMagnifierType(ash::MagnifierType type) = 0; |
| 36 | 45 |
| 37 // Saves the magnifier scale to the pref. | 46 // Saves the magnifier scale to the pref. |
| 38 virtual void SaveScreenMagnifierScale(double scale) = 0; | 47 virtual void SaveScreenMagnifierScale(double scale) = 0; |
| 48 |
| 39 // Loads the magnifier scale from the pref. | 49 // Loads the magnifier scale from the pref. |
| 40 virtual double GetSavedScreenMagnifierScale() = 0; | 50 virtual double GetSavedScreenMagnifierScale() const = 0; |
| 41 | 51 |
| 42 protected: | 52 protected: |
| 43 virtual ~MagnificationManager() {} | 53 virtual ~MagnificationManager() {} |
| 44 }; | 54 }; |
| 45 | 55 |
| 46 } // namespace chromeos | 56 } // namespace chromeos |
| 47 | 57 |
| 48 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_ | 58 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_ |
| OLD | NEW |