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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "content/common/page_messages.h" 56 #include "content/common/page_messages.h"
57 #include "content/common/savable_subframe.h" 57 #include "content/common/savable_subframe.h"
58 #include "content/common/service_worker/service_worker_types.h" 58 #include "content/common/service_worker/service_worker_types.h"
59 #include "content/common/site_isolation_policy.h" 59 #include "content/common/site_isolation_policy.h"
60 #include "content/common/ssl_status_serialization.h" 60 #include "content/common/ssl_status_serialization.h"
61 #include "content/common/swapped_out_messages.h" 61 #include "content/common/swapped_out_messages.h"
62 #include "content/common/view_messages.h" 62 #include "content/common/view_messages.h"
63 #include "content/public/common/bindings_policy.h" 63 #include "content/public/common/bindings_policy.h"
64 #include "content/public/common/browser_side_navigation_policy.h" 64 #include "content/public/common/browser_side_navigation_policy.h"
65 #include "content/public/common/content_constants.h" 65 #include "content/public/common/content_constants.h"
66 #include "content/public/common/content_features.h"
66 #include "content/public/common/content_switches.h" 67 #include "content/public/common/content_switches.h"
67 #include "content/public/common/context_menu_params.h" 68 #include "content/public/common/context_menu_params.h"
68 #include "content/public/common/isolated_world_ids.h" 69 #include "content/public/common/isolated_world_ids.h"
69 #include "content/public/common/page_state.h" 70 #include "content/public/common/page_state.h"
70 #include "content/public/common/resource_response.h" 71 #include "content/public/common/resource_response.h"
71 #include "content/public/common/url_constants.h" 72 #include "content/public/common/url_constants.h"
72 #include "content/public/common/url_utils.h" 73 #include "content/public/common/url_utils.h"
73 #include "content/public/renderer/browser_plugin_delegate.h" 74 #include "content/public/renderer/browser_plugin_delegate.h"
74 #include "content/public/renderer/content_renderer_client.h" 75 #include "content/public/renderer/content_renderer_client.h"
75 #include "content/public/renderer/context_menu_client.h" 76 #include "content/public/renderer/context_menu_client.h"
(...skipping 4202 matching lines...) Expand 10 before | Expand all | Expand 10 after
4278 if (!bluetooth_ && ChildThreadImpl::current()) { 4279 if (!bluetooth_ && ChildThreadImpl::current()) {
4279 bluetooth_.reset(new WebBluetoothImpl( 4280 bluetooth_.reset(new WebBluetoothImpl(
4280 GetServiceRegistry(), ChildThreadImpl::current()->thread_safe_sender(), 4281 GetServiceRegistry(), ChildThreadImpl::current()->thread_safe_sender(),
4281 routing_id_)); 4282 routing_id_));
4282 } 4283 }
4283 4284
4284 return bluetooth_.get(); 4285 return bluetooth_.get();
4285 } 4286 }
4286 4287
4287 blink::WebUSBClient* RenderFrameImpl::usbClient() { 4288 blink::WebUSBClient* RenderFrameImpl::usbClient() {
4289 if (!base::FeatureList::IsEnabled(features::kWebUsb))
4290 return nullptr;
4291
4288 if (!usb_client_) 4292 if (!usb_client_)
4289 usb_client_.reset(new WebUSBClientImpl(GetServiceRegistry())); 4293 usb_client_.reset(new WebUSBClientImpl(GetServiceRegistry()));
4290 4294
4291 return usb_client_.get(); 4295 return usb_client_.get();
4292 } 4296 }
4293 4297
4294 #if defined(ENABLE_WEBVR) 4298 #if defined(ENABLE_WEBVR)
4295 blink::WebVRClient* RenderFrameImpl::webVRClient() { 4299 blink::WebVRClient* RenderFrameImpl::webVRClient() {
4296 if (!vr_dispatcher_) 4300 if (!vr_dispatcher_)
4297 vr_dispatcher_.reset(new VRDispatcher(GetServiceRegistry())); 4301 vr_dispatcher_.reset(new VRDispatcher(GetServiceRegistry()));
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after
6026 int match_count, 6030 int match_count,
6027 int ordinal, 6031 int ordinal,
6028 const WebRect& selection_rect, 6032 const WebRect& selection_rect,
6029 bool final_status_update) { 6033 bool final_status_update) {
6030 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6034 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6031 selection_rect, ordinal, 6035 selection_rect, ordinal,
6032 final_status_update)); 6036 final_status_update));
6033 } 6037 }
6034 6038
6035 } // namespace content 6039 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698