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

Side by Side 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: 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 unified diff | Download patch
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 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 {
22 public: 27 public:
23 // Creates an instance of MagnificationManager. This should be called once, 28 // Returns the existing instance. If there is no instance, creates one.
24 // because only one instance should exist at the same time.
25 static MagnificationManager* CreateInstance();
26 // Returns the existing instance. If there is no instance, returns NULL.
27 static MagnificationManager* GetInstance(); 29 static MagnificationManager* GetInstance();
28 30
31 virtual void Initialize() = 0;
29 virtual ~MagnificationManager() {} 32 virtual ~MagnificationManager() {}
stevenjb 2012/12/04 01:35:34 nit: This should be protected
yoshiki 2012/12/04 08:30:20 Done.
30 33
34 virtual void AddObserver(MagnificationObserver* observer) = 0;
35 virtual void RemoveObserver(MagnificationObserver* observer) = 0;
36
31 // Returns the current type of the screen magnifier. 37 // Returns the current type of the screen magnifier.
32 virtual ash::MagnifierType GetMagnifierType() = 0; 38 virtual ash::MagnifierType GetMagnifierType() = 0;
33 // Changes the type of the screen magnifier. 39 // Changes the type of the screen magnifier.
34 virtual void SetMagnifier(ash::MagnifierType type) = 0; 40 virtual void SetMagnifier(ash::MagnifierType type) = 0;
35 }; 41 };
36 42
37 } // namespace chromeos 43 } // namespace chromeos
38 44
39 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_ 45 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698