OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ | 5 #ifndef ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ |
6 #define ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ | 6 #define ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 virtual float GetScale() const = 0; | 46 virtual float GetScale() const = 0; |
47 | 47 |
48 // Set the top-left point of the magnification window. | 48 // Set the top-left point of the magnification window. |
49 virtual void MoveWindow(int x, int y, bool animate) = 0; | 49 virtual void MoveWindow(int x, int y, bool animate) = 0; |
50 virtual void MoveWindow(const gfx::Point& point, bool animate) = 0; | 50 virtual void MoveWindow(const gfx::Point& point, bool animate) = 0; |
51 // Returns the current top-left point of the magnification window. | 51 // Returns the current top-left point of the magnification window. |
52 virtual gfx::Point GetWindowPosition() const = 0; | 52 virtual gfx::Point GetWindowPosition() const = 0; |
53 | 53 |
54 virtual void SetScrollDirection(ScrollDirection direction) = 0; | 54 virtual void SetScrollDirection(ScrollDirection direction) = 0; |
55 | 55 |
| 56 // Returns the view port(i.e. the current visible window)'s Rect in root |
| 57 // window coordinates. |
| 58 virtual gfx::Rect GetViewportRect() const = 0; |
| 59 |
| 60 // Follows the focus on web page for non-editable controls. |
| 61 virtual void HandleFocusedNodeChanged( |
| 62 bool is_editable_node, |
| 63 const gfx::Rect& node_bounds_in_screen) = 0; |
| 64 |
56 // Returns |point_of_interest_| in MagnificationControllerImpl. This is | 65 // Returns |point_of_interest_| in MagnificationControllerImpl. This is |
57 // the internal variable to stores the last mouse cursor (or last touched) | 66 // the internal variable to stores the last mouse cursor (or last touched) |
58 // location. This method is only for test purpose. | 67 // location. This method is only for test purpose. |
59 virtual gfx::Point GetPointOfInterestForTesting() = 0; | 68 virtual gfx::Point GetPointOfInterestForTesting() = 0; |
60 | 69 |
61 protected: | 70 protected: |
62 MagnificationController() {} | 71 MagnificationController() {} |
63 | 72 |
64 private: | 73 private: |
65 DISALLOW_COPY_AND_ASSIGN(MagnificationController); | 74 DISALLOW_COPY_AND_ASSIGN(MagnificationController); |
66 }; | 75 }; |
67 | 76 |
68 } // namespace ash | 77 } // namespace ash |
69 | 78 |
70 #endif // ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ | 79 #endif // ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ |
OLD | NEW |