Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: chrome/browser/chromeos/accessibility/magnification_manager.h

Issue 11821053: Revert 176087 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
28 // Deletes the existing instance of MagnificationManager. 27 // Deletes the existing instance of MagnificationManager.
29 static void Shutdown(); 28 static void Shutdown();
30
31 // Returns the existing instance. If there is no instance, returns NULL. 29 // Returns the existing instance. If there is no instance, returns NULL.
32 static MagnificationManager* Get(); 30 static MagnificationManager* Get();
33 31
34 // Returns if the screen magnifier is enabled.
35 virtual bool IsMagnifierEnabled() const = 0;
36
37 // Returns the current type of the screen magnifier. 32 // Returns the current type of the screen magnifier.
38 virtual ash::MagnifierType GetMagnifierType() const = 0; 33 virtual ash::MagnifierType GetMagnifierType() = 0;
39
40 // Enables the screen magnifier.
41 virtual void SetMagnifierEnabled(bool enabled) = 0;
42
43 // Changes the type of the screen magnifier. 34 // Changes the type of the screen magnifier.
44 virtual void SetMagnifierType(ash::MagnifierType type) = 0; 35 virtual void SetMagnifier(ash::MagnifierType type) = 0;
45 36
46 // Saves the magnifier scale to the pref. 37 // Saves the magnifier scale to the pref.
47 virtual void SaveScreenMagnifierScale(double scale) = 0; 38 virtual void SaveScreenMagnifierScale(double scale) = 0;
48
49 // Loads the magnifier scale from the pref. 39 // Loads the magnifier scale from the pref.
50 virtual double GetSavedScreenMagnifierScale() const = 0; 40 virtual double GetSavedScreenMagnifierScale() = 0;
51 41
52 protected: 42 protected:
53 virtual ~MagnificationManager() {} 43 virtual ~MagnificationManager() {}
54 }; 44 };
55 45
56 } // namespace chromeos 46 } // namespace chromeos
57 47
58 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_ 48 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698