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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1671553004: Enable WebUSB through the Experimental Framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove RuntimeEnabled=WebUSB. Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698