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

Unified Diff: ui/events/ozone/gamepad/gamepad_event.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
Index: ui/events/ozone/gamepad/gamepad_event.h
diff --git a/ui/events/ozone/gamepad/gamepad_event.h b/ui/events/ozone/gamepad/gamepad_event.h
new file mode 100644
index 0000000000000000000000000000000000000000..c0c53491de11bb6fc98fcaf0e2a39adb70dbf33b
--- /dev/null
+++ b/ui/events/ozone/gamepad/gamepad_event.h
@@ -0,0 +1,45 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_EVENTS_OZONE_GAMEPAD_GAMEPAD_EVENT_H_
+#define UI_EVENTS_OZONE_GAMEPAD_GAMEPAD_EVENT_H_
+
+#include "base/time/time.h"
+#include "ui/events/ozone/gamepad/webgamepad_constants.h"
+
+namespace ui {
+
+class GamepadEvent {
+ public:
+ GamepadEvent(int device_id,
+ GamepadEventType type,
+ uint16_t code,
+ double value,
+ base::TimeTicks timestamp);
+
+ int device_id() { return device_id_; }
+
+ GamepadEventType type() { return type_; }
+
+ uint16_t code() { return code_; }
+
+ double value() { return value_; }
+
+ base::TimeTicks timestamp() { return timestamp_; }
+
+ private:
+ int device_id_;
+
+ GamepadEventType type_;
+
+ uint16_t code_;
+
+ double value_;
+
+ base::TimeTicks timestamp_;
+};
+
+} // namespace ui
+
+#endif // UI_EVENTS_OZONE_GAMEPAD_GAMEPAD_EVENT_H_
« no previous file with comments | « ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc ('k') | ui/events/ozone/gamepad/gamepad_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698