Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
index 071044920909f75247c02cbc3cd13ca391ecea19..95f5e69a4b34fce317448eabea37f81605ab5beb 100644 |
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
@@ -1519,6 +1519,10 @@ void WebLocalFrameImpl::setCoreFrame(LocalFrame* frame) |
provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); |
provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::create(this)); |
+ // Always provided so that availability of the API can be controlled by |
+ // OriginTrials::webUSBEnabled(). |
+ USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullptr); |
+ |
bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled(); |
#if OS(CHROMEOS) || OS(ANDROID) |
enableWebBluetooth = true; |
@@ -1533,8 +1537,6 @@ void WebLocalFrameImpl::setCoreFrame(LocalFrame* frame) |
PresentationController::provideTo(*m_frame, m_client ? m_client->presentationClient() : nullptr); |
if (RuntimeEnabledFeatures::permissionsEnabled()) |
PermissionController::provideTo(*m_frame, m_client ? m_client->permissionClient() : nullptr); |
- if (RuntimeEnabledFeatures::webUSBEnabled()) |
- USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullptr); |
if (RuntimeEnabledFeatures::webVREnabled()) |
VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : nullptr); |
if (RuntimeEnabledFeatures::wakeLockEnabled()) |