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