Index: third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp |
diff --git a/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp |
index 6beb6f5ef2f77044b24f8ee353045dba167d0bc5..8da0d5a7aecf08688cfa4f43bbfdb0029454e29b 100644 |
--- a/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp |
+++ b/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp |
@@ -11,6 +11,8 @@ |
#include "bindings/core/v8/V8Window.h" |
#include "bindings/core/v8/V8WorkerNavigator.h" |
#include "bindings/modules/v8/V8DedicatedWorkerGlobalScopePartial.h" |
+#include "bindings/modules/v8/V8Gamepad.h" |
+#include "bindings/modules/v8/V8GamepadButton.h" |
#include "bindings/modules/v8/V8InstallEvent.h" |
#include "bindings/modules/v8/V8NavigatorPartial.h" |
#include "bindings/modules/v8/V8ServiceWorkerGlobalScope.h" |
@@ -75,6 +77,11 @@ void installConditionalFeaturesForModules( |
V8NavigatorPartial::installWebUSB(isolate, world, v8::Local<v8::Object>(), |
prototypeObject, interfaceObject); |
} |
+ if (RuntimeEnabledFeatures::webVREnabled() || |
+ (originTrialContext && originTrialContext->isFeatureEnabled("WebVR"))) { |
+ V8NavigatorPartial::installWebVR(isolate, world, global, prototypeObject, |
+ interfaceObject); |
+ } |
} else if (wrapperTypeInfo == &V8WorkerNavigator::wrapperTypeInfo) { |
if (RuntimeEnabledFeatures::durableStorageEnabled() || |
(originTrialContext && |
@@ -102,6 +109,16 @@ void installConditionalFeaturesForModules( |
V8WindowPartial::installWebUSB(isolate, world, global, prototypeObject, |
interfaceObject); |
} |
+ if (RuntimeEnabledFeatures::webVREnabled() || |
+ (originTrialContext && originTrialContext->isFeatureEnabled("WebVR"))) { |
+ V8WindowPartial::installWebVR(isolate, world, global, prototypeObject, |
+ interfaceObject); |
+ } |
+ if (RuntimeEnabledFeatures::gamepadExtensionsEnabled() || |
+ (originTrialContext && originTrialContext->isFeatureEnabled("WebVR"))) { |
haraken
2016/10/07 02:19:52
Shouldn't this be "GamepadExtensions"?
iclelland
2016/10/07 14:51:50
No, chasej pointed out in #9 that this should be "
|
+ V8WindowPartial::installGamepadExtensions( |
+ isolate, world, global, prototypeObject, interfaceObject); |
+ } |
} else if (wrapperTypeInfo == &V8SharedWorkerGlobalScope::wrapperTypeInfo) { |
if (RuntimeEnabledFeatures::durableStorageEnabled() || |
(originTrialContext && |
@@ -138,6 +155,18 @@ void installConditionalFeaturesForModules( |
v8::Local<v8::Object>(), |
prototypeObject, interfaceObject); |
} |
+ } else if (wrapperTypeInfo == &V8Gamepad::wrapperTypeInfo) { |
+ if (RuntimeEnabledFeatures::gamepadExtensionsEnabled() || |
+ (originTrialContext && originTrialContext->isFeatureEnabled("WebVR"))) { |
haraken
2016/10/07 02:19:52
Ditto.
|
+ V8Gamepad::installGamepadExtensions(isolate, world, global, |
+ prototypeObject, interfaceObject); |
+ } |
+ } else if (wrapperTypeInfo == &V8GamepadButton::wrapperTypeInfo) { |
+ if (RuntimeEnabledFeatures::gamepadExtensionsEnabled() || |
+ (originTrialContext && originTrialContext->isFeatureEnabled("WebVR"))) { |
haraken
2016/10/07 02:19:52
Ditto.
|
+ V8GamepadButton::installGamepadExtensions( |
+ isolate, world, global, prototypeObject, interfaceObject); |
+ } |
} |
} |