Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(772)

Unified Diff: ui/events/ozone/evdev/event_factory_evdev.h

Issue 2805793002: ozone: evdev: Add gamepad support (Closed)
Patch Set: Support Gamepad in Ozone. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/event_factory_evdev.h
diff --git a/ui/events/ozone/evdev/event_factory_evdev.h b/ui/events/ozone/evdev/event_factory_evdev.h
index 7213204ba09106808b30c8ff6be726e869656477..0482d9b1fecf0ff3ae5c637e2efb482378489b0d 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.h
+++ b/ui/events/ozone/evdev/event_factory_evdev.h
@@ -19,6 +19,7 @@
#include "ui/events/ozone/evdev/input_controller_evdev.h"
#include "ui/events/ozone/evdev/keyboard_evdev.h"
#include "ui/events/ozone/evdev/mouse_button_map_evdev.h"
+#include "ui/events/ozone/gamepad/gamepad_event.h"
#include "ui/events/platform/platform_event_source.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/sequential_id_generator.h"
@@ -35,6 +36,7 @@ class DeviceManager;
class InputDeviceFactoryEvdev;
class InputDeviceFactoryEvdevProxy;
class SystemInputInjector;
+class GamepadProviderOzone;
enum class DomCode;
enum class StylusState;
@@ -82,6 +84,11 @@ class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver,
void DispatchDeviceListsComplete();
void DispatchStylusStateChanged(StylusState stylus_state);
+ // Gamepad Event and gamepad device event. These events are dispatched to
scottmg 2017/05/01 18:20:52 "Gamepad Event" -> "Gamepad event"
jkwang 2017/05/01 22:21:56 Done.
+ // GamepadObserver through GamepadProviderOzone.
+ void DispatchGamepadEvent(const GamepadEvent& event);
+ void DispatchGamepadDevicesUpdated(const std::vector<InputDevice>& devices);
+
protected:
// DeviceEventObserver overrides:
//
@@ -108,6 +115,9 @@ class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver,
// Interface for scanning & monitoring input devices.
DeviceManager* device_manager_; // Not owned.
+ // Gamepad provider to dispatch gamepad events.
+ GamepadProviderOzone* gamepad_provider_;
+
// Proxy for input device factory (manages device I/O objects).
// The real object lives on a different thread.
std::unique_ptr<InputDeviceFactoryEvdevProxy> input_device_factory_proxy_;

Powered by Google App Engine
This is Rietveld 408576698