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

Unified Diff: public/platform/WebGamepads.h

Issue 200783002: Gamepad API: add support for gamepadconnected and gamepaddisconnected events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix missing check for event type Created 6 years, 9 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
« Source/modules/gamepad/NavigatorGamepad.cpp ('K') | « public/platform/Platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebGamepads.h
diff --git a/public/platform/WebGamepads.h b/public/platform/WebGamepads.h
index 08b067988c7dbc632766a77a52a82ef17fb150f1..a2e9ea10d79a6f64240cf552f4faddd4f2402626 100644
--- a/public/platform/WebGamepads.h
+++ b/public/platform/WebGamepads.h
@@ -32,6 +32,15 @@
namespace blink {
+class WebGamepadListener {
+public:
+ virtual void onGamepadConnected(unsigned index, const blink::WebGamepad&) = 0;
+ virtual void onGamepadDisconnected(unsigned index, const blink::WebGamepad&) = 0;
+
+protected:
+ virtual ~WebGamepadListener() { }
+};
abarth-chromium 2014/03/17 18:23:46 Please put new classes into their own headers.
kbalazs 2014/03/17 23:49:27 Done.
+
#pragma pack(push, 1)
// This structure is intentionally POD and fixed size so that it can be stored
« Source/modules/gamepad/NavigatorGamepad.cpp ('K') | « public/platform/Platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698