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

Unified Diff: third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp

Issue 2385123005: Enable WebVR origin trial experiments. (Closed)
Patch Set: Rebase for conflict in ConditionalFeaturesForModules.cpp Created 4 years, 2 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: 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 2ed280da0548e2d03996d18ced179199e0d5f9a1..ae1d1aad060bbd750d01985fb09a575a2f766f7b 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"
@@ -67,6 +69,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 == &V8Window::wrapperTypeInfo) {
if (RuntimeEnabledFeatures::webBluetoothEnabled() ||
(originTrialContext &&
@@ -80,6 +87,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"))) {
+ V8WindowPartial::installGamepadExtensions(
+ isolate, world, global, prototypeObject, interfaceObject);
+ }
} else if (wrapperTypeInfo == &V8ServiceWorkerGlobalScope::wrapperTypeInfo) {
if (RuntimeEnabledFeatures::foreignFetchEnabled() ||
(originTrialContext &&
@@ -95,6 +112,18 @@ void installConditionalFeaturesForModules(
v8::Local<v8::Object>(),
prototypeObject, interfaceObject);
}
+ } else if (wrapperTypeInfo == &V8Gamepad::wrapperTypeInfo) {
+ if (RuntimeEnabledFeatures::gamepadExtensionsEnabled() ||
+ (originTrialContext && originTrialContext->isFeatureEnabled("WebVR"))) {
+ V8Gamepad::installGamepadExtensions(isolate, world, global,
+ prototypeObject, interfaceObject);
+ }
+ } else if (wrapperTypeInfo == &V8GamepadButton::wrapperTypeInfo) {
+ if (RuntimeEnabledFeatures::gamepadExtensionsEnabled() ||
+ (originTrialContext && originTrialContext->isFeatureEnabled("WebVR"))) {
+ V8GamepadButton::installGamepadExtensions(
+ isolate, world, global, prototypeObject, interfaceObject);
+ }
}
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | third_party/WebKit/Source/modules/gamepad/Gamepad.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698