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

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

Issue 1908913002: Revert of mus: Fix event transformation in client code. (Closed) 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 | « no previous file | 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
68 Window* mouse_pressed_handler() { return mouse_pressed_handler_; } 70 Window* mouse_pressed_handler() { return mouse_pressed_handler_; }
69 Window* mouse_moved_handler() { return mouse_moved_handler_; } 71 Window* mouse_moved_handler() { return mouse_moved_handler_; }
70 72
71 // Repost event for re-processing. Used when exiting context menus. 73 // Repost event for re-processing. Used when exiting context menus.
72 // We support the ET_MOUSE_PRESSED, ET_TOUCH_PRESSED and ET_GESTURE_TAP_DOWN 74 // We support the ET_MOUSE_PRESSED, ET_TOUCH_PRESSED and ET_GESTURE_TAP_DOWN
73 // event types (although the latter is currently a no-op). 75 // event types (although the latter is currently a no-op).
74 void RepostEvent(const ui::LocatedEvent* event); 76 void RepostEvent(const ui::LocatedEvent* event);
75 77
76 // Invoked when the mouse events get enabled or disabled. 78 // Invoked when the mouse events get enabled or disabled.
77 void OnMouseEventsEnableStateChanged(bool enabled); 79 void OnMouseEventsEnableStateChanged(bool enabled);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 std::unique_ptr<ui::LocatedEvent> held_move_event_; 264 std::unique_ptr<ui::LocatedEvent> held_move_event_;
263 265
264 // Allowing for reposting of events. Used when exiting context menus. 266 // Allowing for reposting of events. Used when exiting context menus.
265 std::unique_ptr<ui::LocatedEvent> held_repostable_event_; 267 std::unique_ptr<ui::LocatedEvent> held_repostable_event_;
266 268
267 // Set when dispatching a held event. 269 // Set when dispatching a held event.
268 ui::LocatedEvent* dispatching_held_event_; 270 ui::LocatedEvent* dispatching_held_event_;
269 271
270 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; 272 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_;
271 273
274 bool transform_events_;
275
272 // Used to schedule reposting an event. 276 // Used to schedule reposting an event.
273 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_; 277 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_;
274 278
275 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. 279 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0.
276 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; 280 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_;
277 281
278 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); 282 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher);
279 }; 283 };
280 284
281 } // namespace aura 285 } // namespace aura
282 286
283 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698