| OLD | NEW |
| 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 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 3837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3848 bluetooth_.reset(new WebBluetoothImpl( | 3848 bluetooth_.reset(new WebBluetoothImpl( |
| 3849 ChildThreadImpl::current()->thread_safe_sender(), routing_id_)); | 3849 ChildThreadImpl::current()->thread_safe_sender(), routing_id_)); |
| 3850 } | 3850 } |
| 3851 | 3851 |
| 3852 return bluetooth_.get(); | 3852 return bluetooth_.get(); |
| 3853 } | 3853 } |
| 3854 | 3854 |
| 3855 blink::WebUSBClient* RenderFrameImpl::usbClient() { | 3855 blink::WebUSBClient* RenderFrameImpl::usbClient() { |
| 3856 #if !defined(OS_ANDROID) | 3856 #if !defined(OS_ANDROID) |
| 3857 if (!usb_client_) { | 3857 if (!usb_client_) { |
| 3858 mojo::ServiceProviderPtr device_services = | 3858 usb_client_.reset(new WebUSBClientImpl(GetServiceRegistry())); |
| 3859 ConnectToApplication(GURL(device::kDevicesMojoAppUrl)); | |
| 3860 usb_client_.reset(new WebUSBClientImpl(device_services.Pass())); | |
| 3861 } | 3859 } |
| 3862 #endif | 3860 #endif |
| 3863 return usb_client_.get(); | 3861 return usb_client_.get(); |
| 3864 } | 3862 } |
| 3865 | 3863 |
| 3866 #if defined(ENABLE_WEBVR) | 3864 #if defined(ENABLE_WEBVR) |
| 3867 blink::WebVRClient* RenderFrameImpl::webVRClient() { | 3865 blink::WebVRClient* RenderFrameImpl::webVRClient() { |
| 3868 if (!vr_dispatcher_) | 3866 if (!vr_dispatcher_) |
| 3869 vr_dispatcher_.reset(new VRDispatcher(GetServiceRegistry())); | 3867 vr_dispatcher_.reset(new VRDispatcher(GetServiceRegistry())); |
| 3870 | 3868 |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5137 mojo::ServiceProviderPtr service_provider; | 5135 mojo::ServiceProviderPtr service_provider; |
| 5138 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5136 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
| 5139 request->url = mojo::String::From(url); | 5137 request->url = mojo::String::From(url); |
| 5140 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5138 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
| 5141 nullptr, nullptr, | 5139 nullptr, nullptr, |
| 5142 base::Bind(&OnGotContentHandlerID)); | 5140 base::Bind(&OnGotContentHandlerID)); |
| 5143 return service_provider.Pass(); | 5141 return service_provider.Pass(); |
| 5144 } | 5142 } |
| 5145 | 5143 |
| 5146 } // namespace content | 5144 } // namespace content |
| OLD | NEW |