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/base/events/event_handler.h" | 9 #include "ui/base/events/event_handler.h" |
10 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Create the magnifier window. | 60 // Create the magnifier window. |
61 void CreateMagnifierWindow(); | 61 void CreateMagnifierWindow(); |
62 | 62 |
63 // Cleans up the window if needed. | 63 // Cleans up the window if needed. |
64 void CloseMagnifierWindow(); | 64 void CloseMagnifierWindow(); |
65 | 65 |
66 // Removes this as an observer of the zoom widget and the root window. | 66 // Removes this as an observer of the zoom widget and the root window. |
67 void RemoveZoomWidgetObservers(); | 67 void RemoveZoomWidgetObservers(); |
68 | 68 |
69 // ui::EventHandler overrides: | 69 // ui::EventHandler overrides: |
70 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 70 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
71 | 71 |
72 // Overridden from WindowObserver: | 72 // Overridden from WindowObserver: |
73 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 73 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
74 | 74 |
75 // Overridden from WidgetObserver: | 75 // Overridden from WidgetObserver: |
76 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; | 76 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; |
77 | 77 |
78 // True if the magnified window is in motion of zooming or un-zooming effect. | 78 // True if the magnified window is in motion of zooming or un-zooming effect. |
79 // Otherwise, false. | 79 // Otherwise, false. |
80 bool is_on_zooming_; | 80 bool is_on_zooming_; |
81 | 81 |
82 bool is_enabled_; | 82 bool is_enabled_; |
83 | 83 |
84 // Current scale, origin (left-top) position of the magnification window. | 84 // Current scale, origin (left-top) position of the magnification window. |
85 float scale_; | 85 float scale_; |
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 |