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..5f3b759d8040c69ac1b3baaac89abb7530bf66a5 |
| --- /dev/null |
| +++ b/ash/magnifier/partial_magnification_controller.h |
| @@ -0,0 +1,46 @@ |
| +// 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 { |
| + 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; |
|
oshima
2012/10/10 00:57:47
new line between methods
Zachary Kuznia
2012/10/10 09:45:43
Done.
|
| + // Returns the current magnification ratio. |
| + virtual float GetScale() const = 0; |
| + |
| + protected: |
| + PartialMagnificationController() {} |
| +}; |
| + |
| +} // namespace internal |
| +} // namespace ash |
| + |
| +#endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ |