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

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

Issue 1906603002: mus: Fix event transformation in client code. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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
« no previous file with comments | « ui/aura/test/x11_event_sender.cc ('k') | ui/aura/window_event_dispatcher.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 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 <memory> 10 #include <memory>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // event dispatch. 58 // event dispatch.
59 class AURA_EXPORT WindowEventDispatcher : public ui::EventProcessor, 59 class AURA_EXPORT WindowEventDispatcher : public ui::EventProcessor,
60 public ui::GestureEventHelper, 60 public ui::GestureEventHelper,
61 public client::CaptureDelegate, 61 public client::CaptureDelegate,
62 public WindowObserver, 62 public WindowObserver,
63 public EnvObserver { 63 public EnvObserver {
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; }
69
70 Window* mouse_pressed_handler() { return mouse_pressed_handler_; } 68 Window* mouse_pressed_handler() { return mouse_pressed_handler_; }
71 Window* mouse_moved_handler() { return mouse_moved_handler_; } 69 Window* mouse_moved_handler() { return mouse_moved_handler_; }
72 70
73 // Repost event for re-processing. Used when exiting context menus. 71 // Repost event for re-processing. Used when exiting context menus.
74 // We support the ET_MOUSE_PRESSED, ET_TOUCH_PRESSED and ET_GESTURE_TAP_DOWN 72 // We support the ET_MOUSE_PRESSED, ET_TOUCH_PRESSED and ET_GESTURE_TAP_DOWN
75 // event types (although the latter is currently a no-op). 73 // event types (although the latter is currently a no-op).
76 void RepostEvent(const ui::LocatedEvent* event); 74 void RepostEvent(const ui::LocatedEvent* event);
77 75
78 // Invoked when the mouse events get enabled or disabled. 76 // Invoked when the mouse events get enabled or disabled.
79 void OnMouseEventsEnableStateChanged(bool enabled); 77 void OnMouseEventsEnableStateChanged(bool enabled);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 std::unique_ptr<ui::LocatedEvent> held_move_event_; 262 std::unique_ptr<ui::LocatedEvent> held_move_event_;
265 263
266 // Allowing for reposting of events. Used when exiting context menus. 264 // Allowing for reposting of events. Used when exiting context menus.
267 std::unique_ptr<ui::LocatedEvent> held_repostable_event_; 265 std::unique_ptr<ui::LocatedEvent> held_repostable_event_;
268 266
269 // Set when dispatching a held event. 267 // Set when dispatching a held event.
270 ui::LocatedEvent* dispatching_held_event_; 268 ui::LocatedEvent* dispatching_held_event_;
271 269
272 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; 270 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_;
273 271
274 bool transform_events_;
275
276 // Used to schedule reposting an event. 272 // Used to schedule reposting an event.
277 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_; 273 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_;
278 274
279 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. 275 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0.
280 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; 276 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_;
281 277
282 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); 278 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher);
283 }; 279 };
284 280
285 } // namespace aura 281 } // namespace aura
286 282
287 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 283 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_
OLDNEW
« no previous file with comments | « ui/aura/test/x11_event_sender.cc ('k') | ui/aura/window_event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698