Chromium Code Reviews| Index: ash/magnifier/partial_magnification_controller.h |
| diff --git a/ash/magnifier/partial_magnification_controller.h b/ash/magnifier/partial_magnification_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cf8c7044018499f7f0d6f52bd480b3a4acd4ea21 |
| --- /dev/null |
| +++ b/ash/magnifier/partial_magnification_controller.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ |
| +#define ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ |
| + |
| +namespace aura { |
| +class RootWindow; |
| +} |
| + |
| +namespace ash { |
| +namespace internal { |
| + |
| +const float kDefaultPartialMagnifiedScale = 1.5f; |
| +const float kNonPartialMagnifiedScale = 1.0f; |
| + |
| +// Controls the partial screen magnifier, which is a small area of the screen |
| +// which is zoomed in. The zoomed area follows the mouse cursor when enabled. |
| +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
|
| + public: |
| + virtual ~PartialMagnificationController() {} |
| + |
| + // Creates a new PartialMagnificationController. The caller takes ownership |
| + // of the returned object. |
| + static PartialMagnificationController* CreateInstance(); |
| + |
| + // Enables (or disables if |enabled| is false) partial screen magnifier |
| + // feature. |
| + virtual void SetEnabled(bool enabled) = 0; |
| + |
| + virtual bool IsEnabled() const = 0; |
| + |
| + // Sets the magnification ratio. 1.0f means no magnification. |
| + virtual void SetScale(float scale) = 0; |
| + |
| + // Returns the current magnification ratio. |
| + virtual float GetScale() const = 0; |
| + |
| + protected: |
| + PartialMagnificationController() {} |
| +}; |
| + |
| +} // namespace internal |
| +} // namespace ash |
| + |
| +#endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ |