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" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "ui/gfx/geometry/point.h" | 12 #include "ui/gfx/geometry/point.h" |
13 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
14 | 14 |
15 namespace aura { | 15 namespace aura { |
16 class RootWindow; | 16 class Window; |
17 } | 17 } |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
20 | 20 |
21 class ASH_EXPORT MagnificationController { | 21 class ASH_EXPORT MagnificationController { |
22 public: | 22 public: |
23 enum ScrollDirection { | 23 enum ScrollDirection { |
24 SCROLL_NONE, | 24 SCROLL_NONE, |
25 SCROLL_LEFT, | 25 SCROLL_LEFT, |
26 SCROLL_RIGHT, | 26 SCROLL_RIGHT, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 // Returns |point_of_interest_| in MagnificationControllerImpl. This is | 65 // Returns |point_of_interest_| in MagnificationControllerImpl. This is |
66 // 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) |
67 // location. This method is only for test purpose. | 67 // location. This method is only for test purpose. |
68 virtual gfx::Point GetPointOfInterestForTesting() = 0; | 68 virtual gfx::Point GetPointOfInterestForTesting() = 0; |
69 | 69 |
70 // Returns true if magnifier is still on animation for moving viewport. | 70 // Returns true if magnifier is still on animation for moving viewport. |
71 // This is only used for testing purpose. | 71 // This is only used for testing purpose. |
72 virtual bool IsOnAnimationForTesting() const = 0; | 72 virtual bool IsOnAnimationForTesting() const = 0; |
73 | 73 |
| 74 // Switch Magnified RootWindow to |new_root_window|. This does following: |
| 75 // - Unzoom the current root_window. |
| 76 // - Zoom the given new root_window |new_root_window|. |
| 77 // - Switch the target window from current window to |new_root_window|. |
| 78 virtual void SwitchTargetRootWindow(aura::Window* window, |
| 79 bool redraw_original_root) = 0; |
| 80 |
74 protected: | 81 protected: |
75 MagnificationController() {} | 82 MagnificationController() {} |
76 | 83 |
77 private: | 84 private: |
78 DISALLOW_COPY_AND_ASSIGN(MagnificationController); | 85 DISALLOW_COPY_AND_ASSIGN(MagnificationController); |
79 }; | 86 }; |
80 | 87 |
81 } // namespace ash | 88 } // namespace ash |
82 | 89 |
83 #endif // ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ | 90 #endif // ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_ |
OLD | NEW |