OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ |
| 6 #define ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ |
| 7 |
| 8 namespace aura { |
| 9 class RootWindow; |
| 10 } |
| 11 |
| 12 namespace ash { |
| 13 namespace internal { |
| 14 |
| 15 const float kDefaultPartialMagnifiedScale = 1.5f; |
| 16 const float kNonPartialMagnifiedScale = 1.0f; |
| 17 |
| 18 // Controls the partial screen magnifier, which is a small area of the screen |
| 19 // which is zoomed in. The zoomed area follows the mouse cursor when enabled. |
| 20 class PartialMagnificationController { |
| 21 public: |
| 22 virtual ~PartialMagnificationController() {} |
| 23 |
| 24 // Creates a new PartialMagnificationController. The caller takes ownership |
| 25 // of the returned object. |
| 26 static PartialMagnificationController* CreateInstance(); |
| 27 |
| 28 // Enables (or disables if |enabled| is false) partial screen magnifier |
| 29 // feature. |
| 30 virtual void SetEnabled(bool enabled) = 0; |
| 31 |
| 32 virtual bool IsEnabled() = 0; |
| 33 |
| 34 // Sets the magnification ratio. 1.0f means no magnification. |
| 35 virtual void SetScale(float scale) = 0; |
| 36 // Returns the current magnification ratio. |
| 37 virtual float GetScale() const = 0; |
| 38 |
| 39 protected: |
| 40 PartialMagnificationController() {} |
| 41 }; |
| 42 |
| 43 } // namespace internal |
| 44 } // namespace ash |
| 45 |
| 46 #endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ |
OLD | NEW |