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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 166 |
167 bool is_dispatched_held_event(const ui::Event& event) const; | 167 bool is_dispatched_held_event(const ui::Event& event) const; |
168 | 168 |
169 // Overridden from aura::client::CaptureDelegate: | 169 // Overridden from aura::client::CaptureDelegate: |
170 void UpdateCapture(Window* old_capture, Window* new_capture) override; | 170 void UpdateCapture(Window* old_capture, Window* new_capture) override; |
171 void OnOtherRootGotCapture() override; | 171 void OnOtherRootGotCapture() override; |
172 void SetNativeCapture() override; | 172 void SetNativeCapture() override; |
173 void ReleaseNativeCapture() override; | 173 void ReleaseNativeCapture() override; |
174 | 174 |
175 // Overridden from ui::EventProcessor: | 175 // Overridden from ui::EventProcessor: |
176 ui::EventTarget* GetRootTarget() override; | 176 ui::EventTarget* GetRootForEvent(ui::Event* event) override; |
| 177 ui::EventTargeter* GetDefaultEventTargeter() override; |
177 void OnEventProcessingStarted(ui::Event* event) override; | 178 void OnEventProcessingStarted(ui::Event* event) override; |
178 void OnEventProcessingFinished(ui::Event* event) override; | 179 void OnEventProcessingFinished(ui::Event* event) override; |
179 | 180 |
180 // Overridden from ui::EventDispatcherDelegate. | 181 // Overridden from ui::EventDispatcherDelegate. |
181 bool CanDispatchToTarget(ui::EventTarget* target) override; | 182 bool CanDispatchToTarget(ui::EventTarget* target) override; |
182 ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target, | 183 ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target, |
183 ui::Event* event) override; | 184 ui::Event* event) override; |
184 ui::EventDispatchDetails PostDispatchEvent(ui::EventTarget* target, | 185 ui::EventDispatchDetails PostDispatchEvent(ui::EventTarget* target, |
185 const ui::Event& event) override; | 186 const ui::Event& event) override; |
186 | 187 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 256 |
256 // Set when dispatching a held event. | 257 // Set when dispatching a held event. |
257 ui::LocatedEvent* dispatching_held_event_; | 258 ui::LocatedEvent* dispatching_held_event_; |
258 | 259 |
259 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; | 260 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; |
260 | 261 |
261 std::unique_ptr<EnvInputStateController> env_controller_; | 262 std::unique_ptr<EnvInputStateController> env_controller_; |
262 | 263 |
263 std::unique_ptr<MusMouseLocationUpdater> mus_mouse_location_updater_; | 264 std::unique_ptr<MusMouseLocationUpdater> mus_mouse_location_updater_; |
264 | 265 |
| 266 // The default EventTargeter for WindowEventDispatcher generated events. |
| 267 std::unique_ptr<ui::EventTargeter> event_targeter_; |
| 268 |
265 // Used to schedule reposting an event. | 269 // Used to schedule reposting an event. |
266 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_; | 270 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_; |
267 | 271 |
268 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 272 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |
269 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 273 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |
270 | 274 |
271 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 275 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |
272 }; | 276 }; |
273 | 277 |
274 } // namespace aura | 278 } // namespace aura |
275 | 279 |
276 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 280 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
OLD | NEW |