| 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..c9b4ba45a4e10b882b3365eb0ea255dd3c55c99b
|
| --- /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() = 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_
|
|
|