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 ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ | 5 #ifndef ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ |
6 #define ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ | 6 #define ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 // Creates a new MagnificationController. The caller takes ownership of the | 33 // Creates a new MagnificationController. The caller takes ownership of the |
34 // returned object. | 34 // returned object. |
35 static MagnificationController* CreateInstance(); | 35 static MagnificationController* CreateInstance(); |
36 | 36 |
37 // Enables (or disables if |enabled| is false) screen magnifier feature. | 37 // Enables (or disables if |enabled| is false) screen magnifier feature. |
38 virtual void SetEnabled(bool enabled) = 0; | 38 virtual void SetEnabled(bool enabled) = 0; |
39 | 39 |
40 // Returns if the screen magnifier is enabled or not. | 40 // Returns if the screen magnifier is enabled or not. |
41 virtual bool IsEnabled() const = 0; | 41 virtual bool IsEnabled() const = 0; |
42 | 42 |
| 43 // Enables or disables the feature for keeping the text input focus centered. |
| 44 virtual void SetKeepFocusCentered(bool keep_focus_centered) = 0; |
| 45 |
| 46 // Returns true if magnifier will keep the focus centered in screen for text |
| 47 // input. |
| 48 virtual bool KeepFocusCentered() const = 0; |
| 49 |
43 // Sets the magnification ratio. 1.0f means no magnification. | 50 // Sets the magnification ratio. 1.0f means no magnification. |
44 virtual void SetScale(float scale, bool animate) = 0; | 51 virtual void SetScale(float scale, bool animate) = 0; |
45 // Returns the current magnification ratio. | 52 // Returns the current magnification ratio. |
46 virtual float GetScale() const = 0; | 53 virtual float GetScale() const = 0; |
47 | 54 |
48 // Set the top-left point of the magnification window. | 55 // Set the top-left point of the magnification window. |
49 virtual void MoveWindow(int x, int y, bool animate) = 0; | 56 virtual void MoveWindow(int x, int y, bool animate) = 0; |
50 virtual void MoveWindow(const gfx::Point& point, bool animate) = 0; | 57 virtual void MoveWindow(const gfx::Point& point, bool animate) = 0; |
51 // Returns the current top-left point of the magnification window. | 58 // Returns the current top-left point of the magnification window. |
52 virtual gfx::Point GetWindowPosition() const = 0; | 59 virtual gfx::Point GetWindowPosition() const = 0; |
(...skipping 28 matching lines...) Expand all Loading... |
81 protected: | 88 protected: |
82 MagnificationController() {} | 89 MagnificationController() {} |
83 | 90 |
84 private: | 91 private: |
85 DISALLOW_COPY_AND_ASSIGN(MagnificationController); | 92 DISALLOW_COPY_AND_ASSIGN(MagnificationController); |
86 }; | 93 }; |
87 | 94 |
88 } // namespace ash | 95 } // namespace ash |
89 | 96 |
90 #endif // ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ | 97 #endif // ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ |
OLD | NEW |