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

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, 7 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
« no previous file with comments | « ui/events/ozone/evdev/event_device_test_util.cc ('k') | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..046aa5bcbf3d2ca41ae352fdbcf54c4ded667f35 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
+ // 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_;
« no previous file with comments | « ui/events/ozone/evdev/event_device_test_util.cc ('k') | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698