| 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() = 0; |
| 59 |
| 60 // Handles focusedNodeChanged event, follows the focus on web page for |
| 61 // non-editable controls. |
| 62 virtual void HandleFocusedNodeChanged( |
| 63 bool is_editable_node, |
| 64 const gfx::Rect& node_bounds_in_screen) = 0; |
| 65 |
| 56 // Returns |point_of_interest_| in MagnificationControllerImpl. This is | 66 // Returns |point_of_interest_| in MagnificationControllerImpl. This is |
| 57 // the internal variable to stores the last mouse cursor (or last touched) | 67 // the internal variable to stores the last mouse cursor (or last touched) |
| 58 // location. This method is only for test purpose. | 68 // location. This method is only for test purpose. |
| 59 virtual gfx::Point GetPointOfInterestForTesting() = 0; | 69 virtual gfx::Point GetPointOfInterestForTesting() = 0; |
| 60 | 70 |
| 61 protected: | 71 protected: |
| 62 MagnificationController() {} | 72 MagnificationController() {} |
| 63 | 73 |
| 64 private: | 74 private: |
| 65 DISALLOW_COPY_AND_ASSIGN(MagnificationController); | 75 DISALLOW_COPY_AND_ASSIGN(MagnificationController); |
| 66 }; | 76 }; |
| 67 | 77 |
| 68 } // namespace ash | 78 } // namespace ash |
| 69 | 79 |
| 70 #endif // ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ | 80 #endif // ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ |
| OLD | NEW |