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

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

Issue 1565013002: Don't send touch events to windows like menus when the touch occurs outside the menu bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore DCHECK Created 4 years, 11 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 public: 64 public:
65 explicit WindowEventDispatcher(WindowTreeHost* host); 65 explicit WindowEventDispatcher(WindowTreeHost* host);
66 ~WindowEventDispatcher() override; 66 ~WindowEventDispatcher() override;
67 67
68 void set_transform_events(bool value) { transform_events_ = value; } 68 void set_transform_events(bool value) { transform_events_ = value; }
69 69
70 Window* mouse_pressed_handler() { return mouse_pressed_handler_; } 70 Window* mouse_pressed_handler() { return mouse_pressed_handler_; }
71 Window* mouse_moved_handler() { return mouse_moved_handler_; } 71 Window* mouse_moved_handler() { return mouse_moved_handler_; }
72 72
73 // Repost event for re-processing. Used when exiting context menus. 73 // Repost event for re-processing. Used when exiting context menus.
74 // We only support the ET_MOUSE_PRESSED and ET_GESTURE_TAP_DOWN event 74 // We support the ET_MOUSE_PRESSED, ET_TOUCH_PRESSED and ET_GESTURE_TAP_DOWN
75 // types (although the latter is currently a no-op). 75 // event types (although the latter is currently a no-op).
76 void RepostEvent(const ui::LocatedEvent& event); 76 void RepostEvent(const ui::LocatedEvent* event);
77 77
78 // Invoked when the mouse events get enabled or disabled. 78 // Invoked when the mouse events get enabled or disabled.
79 void OnMouseEventsEnableStateChanged(bool enabled); 79 void OnMouseEventsEnableStateChanged(bool enabled);
80 80
81 void DispatchCancelModeEvent(); 81 void DispatchCancelModeEvent();
82 82
83 // Dispatches a ui::ET_MOUSE_EXITED event at |point| to the |target| 83 // Dispatches a ui::ET_MOUSE_EXITED event at |point| to the |target|
84 // If the |target| is NULL, we will dispatch the event to the root-window 84 // If the |target| is NULL, we will dispatch the event to the root-window
85 // TODO(beng): needed only for WTH::OnCursorVisibilityChanged(). 85 // TODO(beng): needed only for WTH::OnCursorVisibilityChanged().
86 ui::EventDispatchDetails DispatchMouseExitAtPoint(Window* target, 86 ui::EventDispatchDetails DispatchMouseExitAtPoint(Window* target,
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. 279 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0.
280 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; 280 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_;
281 281
282 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); 282 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher);
283 }; 283 };
284 284
285 } // namespace aura 285 } // namespace aura
286 286
287 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 287 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/aura/window_event_dispatcher.cc » ('j') | ui/views/controls/menu/menu_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698