| 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_PARTIAL_MAGNIFICATION_CONTROLLER_H_ | 5 #ifndef ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ |
| 6 #define ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ | 6 #define ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "ui/aura/window_observer.h" | 8 #include "ui/aura/window_observer.h" |
| 9 #include "ui/events/event_handler.h" | 9 #include "ui/events/event_handler.h" |
| 10 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 float GetScale() const { return scale_; } | 42 float GetScale() const { return scale_; } |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 void OnMouseMove(const gfx::Point& location_in_root); | 45 void OnMouseMove(const gfx::Point& location_in_root); |
| 46 | 46 |
| 47 // Switch PartialMagnified RootWindow to |new_root_window|. This does | 47 // Switch PartialMagnified RootWindow to |new_root_window|. This does |
| 48 // following: | 48 // following: |
| 49 // - Remove the magnifier from the current root window. | 49 // - Remove the magnifier from the current root window. |
| 50 // - Create a magnifier in the new root_window |new_root_window|. | 50 // - Create a magnifier in the new root_window |new_root_window|. |
| 51 // - Switch the target window from current window to |new_root_window|. | 51 // - Switch the target window from current window to |new_root_window|. |
| 52 void SwitchTargetRootWindow(aura::RootWindow* new_root_window); | 52 void SwitchTargetRootWindow(aura::Window* new_root_window); |
| 53 | 53 |
| 54 // Returns the root window that contains the mouse cursor. | 54 // Returns the root window that contains the mouse cursor. |
| 55 aura::RootWindow* GetCurrentRootWindow(); | 55 aura::RootWindow* GetCurrentRootWindow(); |
| 56 | 56 |
| 57 // Return true if the magnification scale > kMinPartialMagnifiedScaleThreshold | 57 // Return true if the magnification scale > kMinPartialMagnifiedScaleThreshold |
| 58 bool IsPartialMagnified() const; | 58 bool IsPartialMagnified() const; |
| 59 | 59 |
| 60 // Create the magnifier window. | 60 // Create the magnifier window. |
| 61 void CreateMagnifierWindow(); | 61 void CreateMagnifierWindow(); |
| 62 | 62 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 86 gfx::Point origin_; | 86 gfx::Point origin_; |
| 87 | 87 |
| 88 views::Widget* zoom_widget_; | 88 views::Widget* zoom_widget_; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(PartialMagnificationController); | 90 DISALLOW_COPY_AND_ASSIGN(PartialMagnificationController); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace ash | 93 } // namespace ash |
| 94 | 94 |
| 95 #endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ | 95 #endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ |
| OLD | NEW |