Roll src/third_party/WebKit 9d2dfea:3aea697 (svn 201972:201973)
[chromium-blink-merge.git] / content / renderer / usb / web_usb_client_impl.h
blob8aca79493a4a213c4882f9dd0870d76243134eae
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_USB_WEB_USB_CLIENT_IMPL_H_
6 #define CONTENT_RENDERER_USB_WEB_USB_CLIENT_IMPL_H_
8 #include "base/id_map.h"
9 #include "base/macros.h"
10 #include "device/devices_app/usb/public/interfaces/device_manager.mojom.h"
11 #include "mojo/application/public/interfaces/service_provider.mojom.h"
12 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBClient.h"
14 namespace content {
16 class WebUSBClientImpl : public blink::WebUSBClient {
17 public:
18 explicit WebUSBClientImpl(mojo::ServiceProviderPtr device_services);
19 ~WebUSBClientImpl() override;
21 private:
22 // blink::WebUSBClient implementation:
23 void getDevices(blink::WebUSBClientGetDevicesCallbacks* callbacks) override;
24 void requestDevice(
25 const blink::WebUSBDeviceRequestOptions& options,
26 blink::WebUSBClientRequestDeviceCallbacks* callbacks) override;
28 mojo::ServiceProviderPtr device_services_;
29 device::usb::DeviceManagerPtr device_manager_;
31 DISALLOW_COPY_AND_ASSIGN(WebUSBClientImpl);
34 } // namespace content
36 #endif // CONTENT_RENDERER_USB_WEB_USB_CLIENT_IMPL_H_