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

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: rebase 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
« no previous file with comments | « ash/magnifier/magnifier_constants.h ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. 132 // Moves the cursor to the |host_location| given in host coordinates.
133 void MoveCursorToHostLoation(const gfx::Point& host_location); 133 void MoveCursorToHostLocation(const gfx::Point& host_location);
134 134
135 // Clips the cursor movement to the root_window. 135 // Clips the cursor movement to the root_window.
136 bool ConfineCursorToWindow(); 136 bool ConfineCursorToWindow();
137 137
138 // Draws the necessary set of windows. 138 // Draws the necessary set of windows.
139 void Draw(); 139 void Draw();
140 140
141 // Draw the whole screen. 141 // Draw the whole screen.
142 void ScheduleFullRedraw(); 142 void ScheduleFullRedraw();
143 143
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // Updates the event with the appropriate transform for the device scale 311 // Updates the event with the appropriate transform for the device scale
312 // factor. The RootWindowHostDelegate dispatches events in the physical pixel 312 // factor. The RootWindowHostDelegate dispatches events in the physical pixel
313 // coordinate. But the event processing from RootWindow onwards happen in 313 // coordinate. But the event processing from RootWindow onwards happen in
314 // 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
315 // 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
316 // 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
317 // kept inside the root window's bounds. 317 // kept inside the root window's bounds.
318 void TransformEventForDeviceScaleFactor(bool keep_inside_root, 318 void TransformEventForDeviceScaleFactor(bool keep_inside_root,
319 ui::LocatedEvent* event); 319 ui::LocatedEvent* event);
320 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
321 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, 326 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|,
322 // sending exited and entered events as its value changes. 327 // sending exited and entered events as its value changes.
323 void HandleMouseMoved(const ui::MouseEvent& event, Window* target); 328 void HandleMouseMoved(const ui::MouseEvent& event, Window* target);
324 329
325 // Dispatches the specified event type (intended for enter/exit) to the 330 // Dispatches the specified event type (intended for enter/exit) to the
326 // |mouse_moved_handler_|. 331 // |mouse_moved_handler_|.
327 void DispatchMouseEnterOrExit(const ui::MouseEvent& event, 332 void DispatchMouseEnterOrExit(const ui::MouseEvent& event,
328 ui::EventType type); 333 ui::EventType type);
329 334
330 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
457 scoped_ptr<ui::ViewProp> prop_; 462 scoped_ptr<ui::ViewProp> prop_;
458 463
459 scoped_ptr<RootWindowTransformer> transformer_; 464 scoped_ptr<RootWindowTransformer> transformer_;
460 465
461 DISALLOW_COPY_AND_ASSIGN(RootWindow); 466 DISALLOW_COPY_AND_ASSIGN(RootWindow);
462 }; 467 };
463 468
464 } // namespace aura 469 } // namespace aura
465 470
466 #endif // UI_AURA_ROOT_WINDOW_H_ 471 #endif // UI_AURA_ROOT_WINDOW_H_
OLDNEW
« no previous file with comments | « ash/magnifier/magnifier_constants.h ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698