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

Unified Diff: content/public/test/layouttest_support.h

Issue 207323002: Gamepad API: add test support for gamepad events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/public/test/layouttest_support.h
diff --git a/content/public/test/layouttest_support.h b/content/public/test/layouttest_support.h
index 370a6e41afdab9a2eae3b4c659f59ff9dcdd23f2..6c7e847723a573cff9d84187646af181cdb458bf 100644
--- a/content/public/test/layouttest_support.h
+++ b/content/public/test/layouttest_support.h
@@ -11,6 +11,7 @@
namespace blink {
class WebDeviceMotionData;
class WebDeviceOrientationData;
+class WebGamepad;
class WebGamepads;
struct WebSize;
}
@@ -42,6 +43,12 @@ void EnableWebTestProxyCreation(const base::Callback<
// WebKitPlatformSupport::sampleGamepads().
void SetMockGamepads(const blink::WebGamepads& pads);
+// Notifies blink about a new gamepad.
+void MockGamepadConnected(int index, const blink::WebGamepad& pad);
+
+// Notifies blink that a gamepad has been disconnected.
+void MockGamepadDisconnected(int index, const blink::WebGamepad& pad);
+
// Sets WebDeviceMotionData that should be used when registering
// a listener through WebKitPlatformSupport::setDeviceMotionListener().
void SetMockDeviceMotionData(const blink::WebDeviceMotionData& data);

Powered by Google App Engine
This is Rietveld 408576698