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

Unified Diff: chrome/browser/chromeos/accessibility/magnification_manager.h

Issue 11280287: Magnifier: Prevent useless operation in enabling/disabling magnifier. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix test failure (MagnificationManagerTest.ChangeMagnifierType) Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/accessibility/magnification_manager.h
diff --git a/chrome/browser/chromeos/accessibility/magnification_manager.h b/chrome/browser/chromeos/accessibility/magnification_manager.h
index 29529b5b647fbbbb7b78f21e0df909204022bf8c..720bc445eedad5afa59467446b61a52dd482179b 100644
--- a/chrome/browser/chromeos/accessibility/magnification_manager.h
+++ b/chrome/browser/chromeos/accessibility/magnification_manager.h
@@ -9,6 +9,11 @@
namespace chromeos {
+class MagnificationObserver {
+ public:
+ virtual void OnMagnifierTypeChanged(ash::MagnifierType new_type) = 0;
+};
+
// MagnificationManager controls the full screen magnifier from chrome-browser
// side (not ash side).
//
@@ -21,17 +26,24 @@ namespace chromeos {
class MagnificationManager {
public:
// Creates an instance of MagnificationManager. This should be called once,
+ // Returns the existing instance. If there is no instance, creates one.
// because only one instance should exist at the same time.
- static MagnificationManager* CreateInstance();
+ static void Initialize();
+ // Deletes the existing instance of MagnificationManager.
+ static void Shutdown();
// Returns the existing instance. If there is no instance, returns NULL.
- static MagnificationManager* GetInstance();
+ static MagnificationManager* Get();
- virtual ~MagnificationManager() {}
+ virtual void AddObserver(MagnificationObserver* observer) = 0;
+ virtual void RemoveObserver(MagnificationObserver* observer) = 0;
// Returns the current type of the screen magnifier.
virtual ash::MagnifierType GetMagnifierType() = 0;
// Changes the type of the screen magnifier.
virtual void SetMagnifier(ash::MagnifierType type) = 0;
+
+ protected:
+ virtual ~MagnificationManager() {}
};
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698