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

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

Issue 2341483004: Fix event dispatching and window resizing in high-dpi mode. (Closed)
Patch Set: remove client area changes Created 4 years, 2 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 <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // event dispatch. 57 // event dispatch.
58 class AURA_EXPORT WindowEventDispatcher : public ui::EventProcessor, 58 class AURA_EXPORT WindowEventDispatcher : public ui::EventProcessor,
59 public ui::GestureEventHelper, 59 public ui::GestureEventHelper,
60 public client::CaptureDelegate, 60 public client::CaptureDelegate,
61 public WindowObserver, 61 public WindowObserver,
62 public EnvObserver { 62 public EnvObserver {
63 public: 63 public:
64 explicit WindowEventDispatcher(WindowTreeHost* host); 64 explicit WindowEventDispatcher(WindowTreeHost* host);
65 ~WindowEventDispatcher() override; 65 ~WindowEventDispatcher() override;
66 66
67 void set_transform_events(bool value) { transform_events_ = value; }
68
69 Window* mouse_pressed_handler() { return mouse_pressed_handler_; } 67 Window* mouse_pressed_handler() { return mouse_pressed_handler_; }
70 Window* mouse_moved_handler() { return mouse_moved_handler_; } 68 Window* mouse_moved_handler() { return mouse_moved_handler_; }
71 69
72 // Repost event for re-processing. Used when exiting context menus. 70 // Repost event for re-processing. Used when exiting context menus.
73 // We support the ET_MOUSE_PRESSED, ET_TOUCH_PRESSED and ET_GESTURE_TAP_DOWN 71 // We support the ET_MOUSE_PRESSED, ET_TOUCH_PRESSED and ET_GESTURE_TAP_DOWN
74 // event types (although the latter is currently a no-op). 72 // event types (although the latter is currently a no-op).
75 void RepostEvent(const ui::LocatedEvent* event); 73 void RepostEvent(const ui::LocatedEvent* event);
76 74
77 // Invoked when the mouse events get enabled or disabled. 75 // Invoked when the mouse events get enabled or disabled.
78 void OnMouseEventsEnableStateChanged(bool enabled); 76 void OnMouseEventsEnableStateChanged(bool enabled);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 std::unique_ptr<ui::LocatedEvent> held_move_event_; 257 std::unique_ptr<ui::LocatedEvent> held_move_event_;
260 258
261 // Allowing for reposting of events. Used when exiting context menus. 259 // Allowing for reposting of events. Used when exiting context menus.
262 std::unique_ptr<ui::LocatedEvent> held_repostable_event_; 260 std::unique_ptr<ui::LocatedEvent> held_repostable_event_;
263 261
264 // Set when dispatching a held event. 262 // Set when dispatching a held event.
265 ui::LocatedEvent* dispatching_held_event_; 263 ui::LocatedEvent* dispatching_held_event_;
266 264
267 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; 265 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_;
268 266
269 bool transform_events_;
270
271 std::unique_ptr<EnvInputStateController> env_controller_; 267 std::unique_ptr<EnvInputStateController> env_controller_;
272 268
273 // Used to schedule reposting an event. 269 // Used to schedule reposting an event.
274 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_; 270 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_;
275 271
276 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. 272 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0.
277 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; 273 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_;
278 274
279 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); 275 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher);
280 }; 276 };
281 277
282 } // namespace aura 278 } // namespace aura
283 279
284 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 280 #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/widget/desktop_aura/desktop_window_tree_host_x11.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698