blob: fc679485e5d6af7ef2e2a5acec98286b6396464e [file] [log] [blame]
Avi Drissman3e1a26c2022-09-15 20:26:031// Copyright 2017 The Chromium Authors
sadrul8a7826a2017-05-15 17:04:392// 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
sadrul8a7826a2017-05-15 17:04:398#include "ui/aura/aura_export.h"
9
10namespace ui {
11class Event;
12struct EventDispatchDetails;
13}
14
15namespace aura {
16
17class WindowTreeHost;
18
Scott Violet83d69d22019-05-16 14:45:2819// Used to inject events as if they came from the OS.
sadrul8a7826a2017-05-15 17:04:3920class AURA_EXPORT EventInjector {
21 public:
22 EventInjector();
Peter Boströmc8c12352021-09-21 23:37:1523
24 EventInjector(const EventInjector&) = delete;
25 EventInjector& operator=(const EventInjector&) = delete;
26
sadrul8a7826a2017-05-15 17:04:3927 ~EventInjector();
28
Scott Violet83d69d22019-05-16 14:45:2829 // Inject |event| to |host|. If |event| is a LocatedEvent, then coordinates
30 // are relative to host and in DIPs.
31 ui::EventDispatchDetails Inject(WindowTreeHost* host, ui::Event* event);
sadrul8a7826a2017-05-15 17:04:3932};
33
34} // namespace aura
35
36#endif // UI_AURA_EVENT_INJECTOR_H_