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

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, 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/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..53cfeb8eeae32d2b0d7e928f1f78ee68597d0285
--- /dev/null
+++ b/ui/events/ozone/gamepad/gamepad_event.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
scottmg 2017/05/01 18:20:52 No (c) in new copyright declarations (and in other
jkwang 2017/05/01 22:21:57 Done.
+// 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
scottmg 2017/05/01 18:20:52 No ; after namespace definitions.
jkwang 2017/05/01 22:21:57 Done.
+
+#endif // UI_EVENTS_OZONE_GAMEPAD_EVENT_H_
scottmg 2017/05/01 18:20:52 This comment does not match the #ifdef.
jkwang 2017/05/01 22:21:57 Done.

Powered by Google App Engine
This is Rietveld 408576698