Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / events / ozone / evdev / input_injector_evdev.h
blobcdb60fa8bc7603e10a543109f7ba6fa989f52056
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
3 // found in the LICENSE file.
5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_
8 #include "ui/events/ozone/evdev/event_dispatch_callback.h"
9 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
10 #include "ui/ozone/public/system_input_injector.h"
12 namespace ui {
14 class Event;
15 class CursorDelegateEvdev;
16 class DeviceEventDispatcherEvdev;
18 class EVENTS_OZONE_EVDEV_EXPORT InputInjectorEvdev
19 : public SystemInputInjector {
20 public:
21 InputInjectorEvdev(scoped_ptr<DeviceEventDispatcherEvdev> dispatcher,
22 CursorDelegateEvdev* cursor);
24 ~InputInjectorEvdev() override;
26 // SystemInputInjector implementation.
27 void InjectMouseButton(EventFlags button, bool down) override;
28 void InjectMouseWheel(int delta_x, int delta_y) override;
29 void MoveCursorTo(const gfx::PointF& location) override;
30 void InjectKeyEvent(DomCode physical_key,
31 bool down,
32 bool suppress_auto_repeat) override;
34 private:
35 // Shared cursor state.
36 CursorDelegateEvdev* cursor_;
38 // Interface for dispatching events.
39 scoped_ptr<DeviceEventDispatcherEvdev> dispatcher_;
41 DISALLOW_COPY_AND_ASSIGN(InputInjectorEvdev);
44 } // namespace ui
46 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_