Allow gamepad API to be enabled at runtime
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Nov 2011 00:27:44 +0000 (00:27 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Nov 2011 00:27:44 +0000 (00:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=71736

Part of full patch, found at
https://bugs.webkit.org/show_bug.cgi?id=69451

Patch by Scott Graham <scottmg@chromium.org> on 2011-11-07
Reviewed by Adam Barth.

No new tests. No new functionality.

* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setGamepadsEnabled):
(WebCore::RuntimeEnabledFeatures::gamepadsEnabled):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99500 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h

index dae439e..261b04f 100755 (executable)
@@ -1,3 +1,20 @@
+2011-11-07  Scott Graham  <scottmg@chromium.org>
+
+        Allow gamepad API to be enabled at runtime
+        https://bugs.webkit.org/show_bug.cgi?id=71736
+
+        Part of full patch, found at
+        https://bugs.webkit.org/show_bug.cgi?id=69451
+
+        Reviewed by Adam Barth.
+
+        No new tests. No new functionality.
+
+        * bindings/generic/RuntimeEnabledFeatures.cpp:
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setGamepadsEnabled):
+        (WebCore::RuntimeEnabledFeatures::gamepadsEnabled):
+
 2011-11-07  Kentaro Hara  <haraken@chromium.org>
 
         Remove [CustomGetter] IDL for window.Option of V8
index 4abea05..1a3537d 100644 (file)
@@ -60,6 +60,10 @@ bool RuntimeEnabledFeatures::isSpeechInputEnabled = true;
 bool RuntimeEnabledFeatures::isMediaStreamEnabled = true;
 #endif
 
+#if ENABLE(GAMEPAD)
+bool RuntimeEnabledFeatures::isGamepadEnabled = false;
+#endif
+
 #if ENABLE(XHR_RESPONSE_BLOB)
 bool RuntimeEnabledFeatures::isXHRResponseBlobEnabled = false;
 #endif
index 6624c7a..8001b7a 100644 (file)
@@ -170,6 +170,11 @@ public:
     static bool webkitPeerConnectionEnabled() { return isMediaStreamEnabled; }
 #endif
 
+#if ENABLE(GAMEPAD)
+    static void setGamepadsEnabled(bool isEnabled) { isGamepadEnabled = isEnabled; }
+    static bool gamepadsEnabled() { return isGamepadEnabled; }
+#endif
+
 #if ENABLE(QUOTA)
     static bool quotaEnabled() { return isQuotaEnabled; }
     static void setQuotaEnabled(bool isEnabled) { isQuotaEnabled = isEnabled; }
@@ -218,6 +223,10 @@ private:
     static bool isMediaStreamEnabled;
 #endif
 
+#if ENABLE(GAMEPAD)
+    static bool isGamepadEnabled;
+#endif
+
 #if ENABLE(QUOTA)
     static bool isQuotaEnabled;
 #endif