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 class MagnificationObserver { | |
13 public: | |
14 virtual void OnMagnifierTypeChanged(ash::MagnifierType new_type) = 0; | |
15 }; | |
16 | |
12 // MagnificationManager controls the full screen magnifier from chrome-browser | 17 // MagnificationManager controls the full screen magnifier from chrome-browser |
13 // side (not ash side). | 18 // side (not ash side). |
14 // | 19 // |
15 // MagnificationManager does: | 20 // MagnificationManager does: |
16 // - Watch logged-in. Changes the behavior between the login screen and user | 21 // - Watch logged-in. Changes the behavior between the login screen and user |
17 // desktop. | 22 // desktop. |
18 // - Watch change of the pref. When the pref changes, the setting of the | 23 // - Watch change of the pref. When the pref changes, the setting of the |
19 // magnifier will interlock with it. | 24 // magnifier will interlock with it. |
20 | 25 |
21 class MagnificationManager { | 26 class MagnificationManager { |
27 protected: | |
28 MagnificationManager() {} | |
29 virtual ~MagnificationManager() {} | |
stevenjb
2012/12/04 18:06:26
protected section needs to follow public. Only the
| |
30 | |
22 public: | 31 public: |
23 // Creates an instance of MagnificationManager. This should be called once, | 32 // Creates an instance of MagnificationManager. This should be called once, |
33 // Returns the existing instance. If there is no instance, creates one. | |
24 // because only one instance should exist at the same time. | 34 // because only one instance should exist at the same time. |
25 static MagnificationManager* CreateInstance(); | 35 static void Initialize(); |
36 // Deletes the existing instance of MagnificationManager. | |
37 static void Shutdown(); | |
26 // Returns the existing instance. If there is no instance, returns NULL. | 38 // Returns the existing instance. If there is no instance, returns NULL. |
27 static MagnificationManager* GetInstance(); | 39 static MagnificationManager* Get(); |
28 | 40 |
29 virtual ~MagnificationManager() {} | 41 virtual void AddObserver(MagnificationObserver* observer) = 0; |
42 virtual void RemoveObserver(MagnificationObserver* observer) = 0; | |
30 | 43 |
31 // Returns the current type of the screen magnifier. | 44 // Returns the current type of the screen magnifier. |
32 virtual ash::MagnifierType GetMagnifierType() = 0; | 45 virtual ash::MagnifierType GetMagnifierType() = 0; |
33 // Changes the type of the screen magnifier. | 46 // Changes the type of the screen magnifier. |
34 virtual void SetMagnifier(ash::MagnifierType type) = 0; | 47 virtual void SetMagnifier(ash::MagnifierType type) = 0; |
35 }; | 48 }; |
36 | 49 |
37 } // namespace chromeos | 50 } // namespace chromeos |
38 | 51 |
39 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_ | 52 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_ |
OLD | NEW |