| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_AURA_EVENT_INJECTOR_H_ |
| 6 #define UI_AURA_EVENT_INJECTOR_H_ |
| 7 |
| 8 #include "services/ui/public/interfaces/window_server_test.mojom.h" |
| 9 #include "ui/aura/aura_export.h" |
| 10 |
| 11 namespace ui { |
| 12 class Event; |
| 13 struct EventDispatchDetails; |
| 14 } |
| 15 |
| 16 namespace aura { |
| 17 |
| 18 class WindowTreeHost; |
| 19 |
| 20 // Used to inject events into the system. In LOCAL mode, it directly injects |
| 21 // events into the WindowTreeHost, but in MUS mode, it injects events into the |
| 22 // window-server (over the mojom API). |
| 23 class AURA_EXPORT EventInjector { |
| 24 public: |
| 25 EventInjector(); |
| 26 ~EventInjector(); |
| 27 |
| 28 ui::EventDispatchDetails Inject(WindowTreeHost* host, ui::Event* event); |
| 29 |
| 30 private: |
| 31 ui::mojom::WindowServerTestPtr window_server_ptr_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(EventInjector); |
| 34 }; |
| 35 |
| 36 } // namespace aura |
| 37 |
| 38 #endif // UI_AURA_EVENT_INJECTOR_H_ |
| OLD | NEW |