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

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

Issue 754013007: Fix the wrong relative coordinates from EventDispatch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | ui/aura/window_event_dispatcher.cc » ('j') | ui/aura/window_tree_host.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_WINDOW_EVENT_DISPATCHER_H_ 5 #ifndef UI_AURA_WINDOW_EVENT_DISPATCHER_H_
6 #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 6 #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // types (although the latter is currently a no-op). 71 // types (although the latter is currently a no-op).
72 void RepostEvent(const ui::LocatedEvent& event); 72 void RepostEvent(const ui::LocatedEvent& event);
73 73
74 // Invoked when the mouse events get enabled or disabled. 74 // Invoked when the mouse events get enabled or disabled.
75 void OnMouseEventsEnableStateChanged(bool enabled); 75 void OnMouseEventsEnableStateChanged(bool enabled);
76 76
77 void DispatchCancelModeEvent(); 77 void DispatchCancelModeEvent();
78 78
79 // Dispatches a ui::ET_MOUSE_EXITED event at |point|. 79 // Dispatches a ui::ET_MOUSE_EXITED event at |point|.
80 // TODO(beng): needed only for WTH::OnCursorVisibilityChanged(). 80 // TODO(beng): needed only for WTH::OnCursorVisibilityChanged().
81 ui::EventDispatchDetails DispatchMouseExitAtPoint( 81 ui::EventDispatchDetails DispatchMouseExitAtPoint(Window* window,
sky 2015/01/06 16:51:30 You need to document what |window| and |target| on
Miyoung Shin 2015/01/07 07:30:48 ok.
82 const gfx::Point& point) WARN_UNUSED_RESULT; 82 const gfx::Point& point)
83 WARN_UNUSED_RESULT;
83 84
84 // Gesture Recognition ------------------------------------------------------- 85 // Gesture Recognition -------------------------------------------------------
85 86
86 // When a touch event is dispatched to a Window, it may want to process the 87 // When a touch event is dispatched to a Window, it may want to process the
87 // touch event asynchronously. In such cases, the window should consume the 88 // touch event asynchronously. In such cases, the window should consume the
88 // event during the event dispatch. Once the event is properly processed, the 89 // event during the event dispatch. Once the event is properly processed, the
89 // window should let the WindowEventDispatcher know about the result of the 90 // window should let the WindowEventDispatcher know about the result of the
90 // event processing, so that gesture events can be properly created and 91 // event processing, so that gesture events can be properly created and
91 // dispatched. |event|'s location should be in the dispatcher's coordinate 92 // dispatched. |event|'s location should be in the dispatcher's coordinate
92 // space, in DIPs. 93 // space, in DIPs.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // coordinate. But the event processing from WindowEventDispatcher onwards 145 // coordinate. But the event processing from WindowEventDispatcher onwards
145 // happen in device-independent pixel coordinate. So it is necessary to update 146 // happen in device-independent pixel coordinate. So it is necessary to update
146 // the event received from the host. 147 // the event received from the host.
147 void TransformEventForDeviceScaleFactor(ui::LocatedEvent* event); 148 void TransformEventForDeviceScaleFactor(ui::LocatedEvent* event);
148 149
149 // Dispatches OnMouseExited to the |window| which is hiding if necessary. 150 // Dispatches OnMouseExited to the |window| which is hiding if necessary.
150 void DispatchMouseExitToHidingWindow(Window* window); 151 void DispatchMouseExitToHidingWindow(Window* window);
151 152
152 // Dispatches the specified event type (intended for enter/exit) to the 153 // Dispatches the specified event type (intended for enter/exit) to the
153 // |mouse_moved_handler_|. 154 // |mouse_moved_handler_|.
154 ui::EventDispatchDetails DispatchMouseEnterOrExit( 155 ui::EventDispatchDetails DispatchMouseEnterOrExit(Window* target,
155 const ui::MouseEvent& event, 156 const ui::MouseEvent& event,
156 ui::EventType type) WARN_UNUSED_RESULT; 157 ui::EventType type)
158 WARN_UNUSED_RESULT;
157 ui::EventDispatchDetails ProcessGestures( 159 ui::EventDispatchDetails ProcessGestures(
158 ui::GestureRecognizer::Gestures* gestures) WARN_UNUSED_RESULT; 160 ui::GestureRecognizer::Gestures* gestures) WARN_UNUSED_RESULT;
159 161
160 // Called when a window becomes invisible, either by being removed 162 // Called when a window becomes invisible, either by being removed
161 // from root window hierarchy, via SetVisible(false) or being destroyed. 163 // from root window hierarchy, via SetVisible(false) or being destroyed.
162 // |reason| specifies what triggered the hiding. Note that becoming invisible 164 // |reason| specifies what triggered the hiding. Note that becoming invisible
163 // will cause a window to lose capture and some windows may destroy themselves 165 // will cause a window to lose capture and some windows may destroy themselves
164 // on capture (like DragDropTracker). 166 // on capture (like DragDropTracker).
165 void OnWindowHidden(Window* invisible, WindowHiddenReason reason); 167 void OnWindowHidden(Window* invisible, WindowHiddenReason reason);
166 168
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 264
263 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. 265 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0.
264 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; 266 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_;
265 267
266 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); 268 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher);
267 }; 269 };
268 270
269 } // namespace aura 271 } // namespace aura
270 272
271 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 273 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/aura/window_event_dispatcher.cc » ('j') | ui/aura/window_tree_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698