Move MatchPattern to its own header and the base namespace.
[chromium-blink-merge.git] / chrome / browser / chromeos / accessibility / magnification_manager.h
blob0defb89c3f307df3de8950204f37635980ac727d
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_
8 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
10 class Profile;
12 namespace chromeos {
14 // MagnificationManager controls the full screen magnifier from chrome-browser
15 // side (not ash side).
17 // MagnificationManager does:
18 // - Watch logged-in. Changes the behavior between the login screen and user
19 // desktop.
20 // - Watch change of the pref. When the pref changes, the setting of the
21 // magnifier will interlock with it.
23 class MagnificationManager {
24 public:
25 // Creates an instance of MagnificationManager. This should be called once,
26 // Returns the existing instance. If there is no instance, creates one.
27 // because only one instance should exist at the same time.
28 static void Initialize();
30 // Deletes the existing instance of MagnificationManager.
31 static void Shutdown();
33 // Returns the existing instance. If there is no instance, returns NULL.
34 static MagnificationManager* Get();
36 // Returns if the screen magnifier is enabled.
37 virtual bool IsMagnifierEnabled() const = 0;
39 // Returns the current type of the screen magnifier.
40 virtual ui::MagnifierType GetMagnifierType() const = 0;
42 // Enables the screen magnifier.
43 virtual void SetMagnifierEnabled(bool enabled) = 0;
45 // Changes the type of the screen magnifier.
46 virtual void SetMagnifierType(ui::MagnifierType type) = 0;
48 // Saves the magnifier scale to the pref.
49 virtual void SaveScreenMagnifierScale(double scale) = 0;
51 // Loads the magnifier scale from the pref.
52 virtual double GetSavedScreenMagnifierScale() const = 0;
54 virtual void SetProfileForTest(Profile* profile) = 0;
56 protected:
57 virtual ~MagnificationManager() {}
60 } // namespace chromeos
62 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_MAGNIFICATION_MANAGER_H_