Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: ash/magnifier/partial_magnification_controller.h

Issue 64933002: Eliminate Shell::RootWindowList in favor of aura::Window::Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "ui/views/widget/widget_observer.h" 11 #include "ui/views/widget/widget_observer.h"
12 12
13 namespace aura {
14 class RootWindow;
15 }
16
17 namespace ash { 13 namespace ash {
18 14
19 const float kDefaultPartialMagnifiedScale = 1.5f; 15 const float kDefaultPartialMagnifiedScale = 1.5f;
20 const float kNonPartialMagnifiedScale = 1.0f; 16 const float kNonPartialMagnifiedScale = 1.0f;
21 17
22 // Controls the partial screen magnifier, which is a small area of the screen 18 // Controls the partial screen magnifier, which is a small area of the screen
23 // which is zoomed in. The zoomed area follows the mouse cursor when enabled. 19 // which is zoomed in. The zoomed area follows the mouse cursor when enabled.
24 class PartialMagnificationController 20 class PartialMagnificationController
25 : public ui::EventHandler, 21 : public ui::EventHandler,
26 public aura::WindowObserver, 22 public aura::WindowObserver,
(...skipping 18 matching lines...) Expand all
45 void OnMouseMove(const gfx::Point& location_in_root); 41 void OnMouseMove(const gfx::Point& location_in_root);
46 42
47 // Switch PartialMagnified RootWindow to |new_root_window|. This does 43 // Switch PartialMagnified RootWindow to |new_root_window|. This does
48 // following: 44 // following:
49 // - Remove the magnifier from the current root window. 45 // - Remove the magnifier from the current root window.
50 // - Create a magnifier in the new root_window |new_root_window|. 46 // - Create a magnifier in the new root_window |new_root_window|.
51 // - Switch the target window from current window to |new_root_window|. 47 // - Switch the target window from current window to |new_root_window|.
52 void SwitchTargetRootWindow(aura::Window* new_root_window); 48 void SwitchTargetRootWindow(aura::Window* new_root_window);
53 49
54 // Returns the root window that contains the mouse cursor. 50 // Returns the root window that contains the mouse cursor.
55 aura::RootWindow* GetCurrentRootWindow(); 51 aura::Window* GetCurrentRootWindow();
56 52
57 // Return true if the magnification scale > kMinPartialMagnifiedScaleThreshold 53 // Return true if the magnification scale > kMinPartialMagnifiedScaleThreshold
58 bool IsPartialMagnified() const; 54 bool IsPartialMagnified() const;
59 55
60 // Create the magnifier window. 56 // Create the magnifier window.
61 void CreateMagnifierWindow(); 57 void CreateMagnifierWindow();
62 58
63 // Cleans up the window if needed. 59 // Cleans up the window if needed.
64 void CloseMagnifierWindow(); 60 void CloseMagnifierWindow();
65 61
(...skipping 20 matching lines...) Expand all
86 gfx::Point origin_; 82 gfx::Point origin_;
87 83
88 views::Widget* zoom_widget_; 84 views::Widget* zoom_widget_;
89 85
90 DISALLOW_COPY_AND_ASSIGN(PartialMagnificationController); 86 DISALLOW_COPY_AND_ASSIGN(PartialMagnificationController);
91 }; 87 };
92 88
93 } // namespace ash 89 } // namespace ash
94 90
95 #endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ 91 #endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698