| OLD | NEW |
| 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 17 matching lines...) Expand all Loading... |
| 28 #include "ui/gfx/native_widget_types.h" | 28 #include "ui/gfx/native_widget_types.h" |
| 29 | 29 |
| 30 namespace ui { | 30 namespace ui { |
| 31 class GestureEvent; | 31 class GestureEvent; |
| 32 class GestureRecognizer; | 32 class GestureRecognizer; |
| 33 class MouseEvent; | 33 class MouseEvent; |
| 34 class TouchEvent; | 34 class TouchEvent; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace aura { | 37 namespace aura { |
| 38 class MusMouseLocationUpdater; |
| 38 class TestScreen; | 39 class TestScreen; |
| 39 class EnvInputStateController; | 40 class EnvInputStateController; |
| 40 class WindowTreeHost; | 41 class WindowTreeHost; |
| 41 | 42 |
| 42 namespace test { | 43 namespace test { |
| 43 class WindowEventDispatcherTestApi; | 44 class WindowEventDispatcherTestApi; |
| 44 } | 45 } |
| 45 | 46 |
| 46 // WindowEventDispatcher orchestrates event dispatch within a window tree | 47 // WindowEventDispatcher orchestrates event dispatch within a window tree |
| 47 // owned by WindowTreeHost. WTH also owns the WED. | 48 // owned by WindowTreeHost. WTH also owns the WED. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 168 |
| 168 // Overridden from aura::client::CaptureDelegate: | 169 // Overridden from aura::client::CaptureDelegate: |
| 169 void UpdateCapture(Window* old_capture, Window* new_capture) override; | 170 void UpdateCapture(Window* old_capture, Window* new_capture) override; |
| 170 void OnOtherRootGotCapture() override; | 171 void OnOtherRootGotCapture() override; |
| 171 void SetNativeCapture() override; | 172 void SetNativeCapture() override; |
| 172 void ReleaseNativeCapture() override; | 173 void ReleaseNativeCapture() override; |
| 173 | 174 |
| 174 // Overridden from ui::EventProcessor: | 175 // Overridden from ui::EventProcessor: |
| 175 ui::EventTarget* GetRootTarget() override; | 176 ui::EventTarget* GetRootTarget() override; |
| 176 void OnEventProcessingStarted(ui::Event* event) override; | 177 void OnEventProcessingStarted(ui::Event* event) override; |
| 178 void OnEventProcessingFinished(ui::Event* event) override; |
| 177 | 179 |
| 178 // Overridden from ui::EventDispatcherDelegate. | 180 // Overridden from ui::EventDispatcherDelegate. |
| 179 bool CanDispatchToTarget(ui::EventTarget* target) override; | 181 bool CanDispatchToTarget(ui::EventTarget* target) override; |
| 180 ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target, | 182 ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target, |
| 181 ui::Event* event) override; | 183 ui::Event* event) override; |
| 182 ui::EventDispatchDetails PostDispatchEvent(ui::EventTarget* target, | 184 ui::EventDispatchDetails PostDispatchEvent(ui::EventTarget* target, |
| 183 const ui::Event& event) override; | 185 const ui::Event& event) override; |
| 184 | 186 |
| 185 // Overridden from ui::GestureEventHelper. | 187 // Overridden from ui::GestureEventHelper. |
| 186 bool CanDispatchToConsumer(ui::GestureConsumer* consumer) override; | 188 bool CanDispatchToConsumer(ui::GestureConsumer* consumer) override; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // Allowing for reposting of events. Used when exiting context menus. | 253 // Allowing for reposting of events. Used when exiting context menus. |
| 252 std::unique_ptr<ui::LocatedEvent> held_repostable_event_; | 254 std::unique_ptr<ui::LocatedEvent> held_repostable_event_; |
| 253 | 255 |
| 254 // Set when dispatching a held event. | 256 // Set when dispatching a held event. |
| 255 ui::LocatedEvent* dispatching_held_event_; | 257 ui::LocatedEvent* dispatching_held_event_; |
| 256 | 258 |
| 257 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; | 259 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; |
| 258 | 260 |
| 259 std::unique_ptr<EnvInputStateController> env_controller_; | 261 std::unique_ptr<EnvInputStateController> env_controller_; |
| 260 | 262 |
| 263 std::unique_ptr<MusMouseLocationUpdater> mus_mouse_location_updater_; |
| 264 |
| 261 // Used to schedule reposting an event. | 265 // Used to schedule reposting an event. |
| 262 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_; | 266 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_; |
| 263 | 267 |
| 264 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 268 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |
| 265 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 269 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |
| 266 | 270 |
| 267 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 271 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |
| 268 }; | 272 }; |
| 269 | 273 |
| 270 } // namespace aura | 274 } // namespace aura |
| 271 | 275 |
| 272 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 276 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
| OLD | NEW |