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

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

Issue 2274303002: Enable the WebUSB Origin Trial. (Closed)
Patch Set: Revert update to global-interface-listing-expected.txt. Created 4 years, 4 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/V8BindingForModules.cpp
diff --git a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
index 344368f6507f5916270d42649b769ea2c52a458a..098a4180c05a7ff283381be8899540340aea9b0e 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
@@ -611,6 +611,16 @@ void installOriginTrialsForModules(ScriptState* scriptState)
}
}
+ if (!originTrialContext->featureBindingsInstalled("WebUSB") && (RuntimeEnabledFeatures::webUSBEnabled() || originTrialContext->isFeatureEnabled("WebUSB"))) {
+ if (executionContext->isDocument()) {
+ // For global interfaces e.g. USBInterface.
+ V8WindowPartial::installWebUSB(scriptState, global);
+ // For navigator interfaces e.g. navigator.usb.
+ V8NavigatorPartial::installWebUSB(scriptState);
+ }
+ }
+
+
if (!originTrialContext->featureBindingsInstalled("ForeignFetch") && (RuntimeEnabledFeatures::foreignFetchEnabled() || originTrialContext->isFeatureEnabled("ForeignFetch"))) {
if (executionContext->isServiceWorkerGlobalScope()) {
V8ServiceWorkerGlobalScope::installForeignFetch(scriptState, global);
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp ('k') | third_party/WebKit/Source/modules/webusb/NavigatorUSB.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698