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 CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_
6 #define CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_
8 #include "device/devices_app/usb/public/interfaces/permission_provider.mojom.h"
9 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h"
10 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
14 class RenderFrameHost
;
17 class WebUSBPermissionProvider
: public device::usb::PermissionProvider
{
20 content::RenderFrameHost
* render_frame_host
,
21 mojo::InterfaceRequest
<device::usb::PermissionProvider
> request
);
23 ~WebUSBPermissionProvider() override
;
26 WebUSBPermissionProvider(content::RenderFrameHost
* render_frame_host
,
27 mojo::InterfaceRequest
<PermissionProvider
> request
);
29 // device::usb::PermissionProvider implementation.
30 void HasDevicePermission(
31 mojo::Array
<device::usb::DeviceInfoPtr
> requested_devices
,
32 const HasDevicePermissionCallback
& callback
) override
;
34 mojo::StrongBinding
<PermissionProvider
> binding_
;
35 content::RenderFrameHost
* const render_frame_host_
;
38 #endif // CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_