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

Side by Side Diff: ui/aura/root_window.h

Issue 13947045: Magnifier: Move the cursor directly to the root window host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a misspelling and add a comment Created 7 years, 7 months 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 UI_AURA_ROOT_WINDOW_H_ 5 #ifndef UI_AURA_ROOT_WINDOW_H_
6 #define UI_AURA_ROOT_WINDOW_H_ 6 #define UI_AURA_ROOT_WINDOW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 // Invoked when the cursor's visibility has changed. 123 // Invoked when the cursor's visibility has changed.
124 void OnCursorVisibilityChanged(bool visible); 124 void OnCursorVisibilityChanged(bool visible);
125 125
126 // Invoked when the mouse events get enabled or disabled. 126 // Invoked when the mouse events get enabled or disabled.
127 void OnMouseEventsEnableStateChanged(bool enabled); 127 void OnMouseEventsEnableStateChanged(bool enabled);
128 128
129 // Moves the cursor to the specified location relative to the root window. 129 // Moves the cursor to the specified location relative to the root window.
130 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; 130 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
131 131
132 // Moves the cursor to the |host_location| given in host coordinates.
133 void MoveCursorToHostLocation(const gfx::Point& host_location);
134
132 // Clips the cursor movement to the root_window. 135 // Clips the cursor movement to the root_window.
133 bool ConfineCursorToWindow(); 136 bool ConfineCursorToWindow();
134 137
135 // Draws the necessary set of windows. 138 // Draws the necessary set of windows.
136 void Draw(); 139 void Draw();
137 140
138 // Draw the whole screen. 141 // Draw the whole screen.
139 void ScheduleFullRedraw(); 142 void ScheduleFullRedraw();
140 143
141 // Draw the damage_rect. 144 // Draw the damage_rect.
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // Updates the event with the appropriate transform for the device scale 311 // Updates the event with the appropriate transform for the device scale
309 // factor. The RootWindowHostDelegate dispatches events in the physical pixel 312 // factor. The RootWindowHostDelegate dispatches events in the physical pixel
310 // coordinate. But the event processing from RootWindow onwards happen in 313 // coordinate. But the event processing from RootWindow onwards happen in
311 // device-independent pixel coordinate. So it is necessary to update the event 314 // device-independent pixel coordinate. So it is necessary to update the event
312 // received from the host. When |keep_inside_root| is true and the event's 315 // received from the host. When |keep_inside_root| is true and the event's
313 // system location is inside host window's bounds, the location will be 316 // system location is inside host window's bounds, the location will be
314 // kept inside the root window's bounds. 317 // kept inside the root window's bounds.
315 void TransformEventForDeviceScaleFactor(bool keep_inside_root, 318 void TransformEventForDeviceScaleFactor(bool keep_inside_root,
316 ui::LocatedEvent* event); 319 ui::LocatedEvent* event);
317 320
321 // Moves the cursor to the specified location. This method is internally used
322 // by MoveCursorTo() and MoveCursorToHostLocation().
323 void MoveCursorToInternal(const gfx::Point& root_location,
324 const gfx::Point& host_location);
325
318 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, 326 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|,
319 // sending exited and entered events as its value changes. 327 // sending exited and entered events as its value changes.
320 void HandleMouseMoved(const ui::MouseEvent& event, Window* target); 328 void HandleMouseMoved(const ui::MouseEvent& event, Window* target);
321 329
322 // Dispatches the specified event type (intended for enter/exit) to the 330 // Dispatches the specified event type (intended for enter/exit) to the
323 // |mouse_moved_handler_|. 331 // |mouse_moved_handler_|.
324 void DispatchMouseEnterOrExit(const ui::MouseEvent& event, 332 void DispatchMouseEnterOrExit(const ui::MouseEvent& event,
325 ui::EventType type); 333 ui::EventType type);
326 334
327 void ProcessEvent(Window* target, ui::Event* event); 335 void ProcessEvent(Window* target, ui::Event* event);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 scoped_ptr<ui::ViewProp> prop_; 462 scoped_ptr<ui::ViewProp> prop_;
455 463
456 scoped_ptr<RootWindowTransformer> transformer_; 464 scoped_ptr<RootWindowTransformer> transformer_;
457 465
458 DISALLOW_COPY_AND_ASSIGN(RootWindow); 466 DISALLOW_COPY_AND_ASSIGN(RootWindow);
459 }; 467 };
460 468
461 } // namespace aura 469 } // namespace aura
462 470
463 #endif // UI_AURA_ROOT_WINDOW_H_ 471 #endif // UI_AURA_ROOT_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698