Chromium Code Reviews| 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 { | |
|
sky
2012/10/11 17:00:49
Is there a reason to make this pure virtual?
Zachary Kuznia
2012/10/12 08:41:35
It's done this way in order to match the style of
sky
2012/10/12 17:09:19
Is there a reason for that?
Zachary Kuznia
2012/10/15 08:28:40
Apparently the reason was to keep the header file
| |
| 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() const = 0; | |
| 33 | |
| 34 // Sets the magnification ratio. 1.0f means no magnification. | |
| 35 virtual void SetScale(float scale) = 0; | |
| 36 | |
| 37 // Returns the current magnification ratio. | |
| 38 virtual float GetScale() const = 0; | |
| 39 | |
| 40 protected: | |
| 41 PartialMagnificationController() {} | |
| 42 }; | |
| 43 | |
| 44 } // namespace internal | |
| 45 } // namespace ash | |
| 46 | |
| 47 #endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ | |
| OLD | NEW |