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

Unified Diff: content/renderer/render_frame_impl.cc

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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index c16d78605ef327d2e38684890f0379344ddbab4b..07d248657d1d02823b2c1c2e2723f581555e65fa 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -63,6 +63,7 @@
#include "content/public/common/bindings_policy.h"
#include "content/public/common/browser_side_navigation_policy.h"
#include "content/public/common/content_constants.h"
+#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/context_menu_params.h"
#include "content/public/common/isolated_world_ids.h"
@@ -4285,6 +4286,9 @@ blink::WebBluetooth* RenderFrameImpl::bluetooth() {
}
blink::WebUSBClient* RenderFrameImpl::usbClient() {
+ if (!base::FeatureList::IsEnabled(features::kWebUsb))
+ return nullptr;
+
if (!usb_client_)
usb_client_.reset(new WebUSBClientImpl(GetServiceRegistry()));

Powered by Google App Engine
This is Rietveld 408576698