Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: ash/magnifier/magnification_controller.h

Issue 10388141: Full-screen Magnifier: Support warping the cursor on the edge (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/magnifier/magnification_controller.h
diff --git a/ash/magnifier/magnification_controller.h b/ash/magnifier/magnification_controller.h
index fe501689d43ebed47f2479d36b1b76fa589c6869..74ce402170ca531be9f8eed777936c22d536321e 100644
--- a/ash/magnifier/magnification_controller.h
+++ b/ash/magnifier/magnification_controller.h
@@ -14,47 +14,40 @@
namespace aura {
class RootWindow;
+class EventFilter;
}
namespace ash {
namespace internal {
+class MagnificationControllerImpl;
+
class MagnificationController {
public:
MagnificationController();
- virtual ~MagnificationController() {}
+ virtual ~MagnificationController();
// Sets the magnification ratio. 1.0f means no magnification.
- void SetScale(float scale);
+ void SetScale(float scale, bool animation);
// Returns the current magnification ratio.
- float GetScale() const { return scale_; }
+ float GetScale() const;
// Set the top-left point of the magnification window.
- void MoveWindow(int x, int y);
- void MoveWindow(const gfx::Point& point);
+ void MoveWindow(int x, int y, bool animation);
+ void MoveWindow(const gfx::Point& point, bool animation);
// Returns the current top-left point of the magnification window.
- gfx::Point GetWindowPosition() const { return gfx::Point(x_, y_); }
+ gfx::Point GetWindowPosition() const;
// Ensures that the given point/rect is inside the magnification window. If
// not, the controller moves the window to contain the given point/rect.
- void EnsureShowRect(const gfx::Rect& rect);
+ void EnsureShowRect(const gfx::Rect& rect, bool animation);
void EnsureShowPoint(const gfx::Point& point, bool animation);
- private:
- aura::RootWindow* root_window_;
-
- // Current scale, position of the magnification window.
- float scale_;
- int x_;
- int y_;
+ aura::EventFilter* GetEventFilter() const;
- // Returns the rect of the magnification window.
- gfx::Rect GetWindowRect();
- // Moves the magnification window to new scale and position. This method
- // should be called internally just after the scale and/or the position are
- // changed.
- void RedrawScreen(bool animation);
+ private:
+ scoped_ptr<MagnificationControllerImpl> impl_;
DISALLOW_COPY_AND_ASSIGN(MagnificationController);
};

Powered by Google App Engine
This is Rietveld 408576698