| // Copyright 2018 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module blink.mojom; |
| |
| import "device/usb/public/mojom/device.mojom"; |
| import "device/usb/public/mojom/device_manager.mojom"; |
| |
| // This is a parallel interface with UsbDeviceManager aimed to handle extra work |
| // such as permission checking, chooser showing, etc. in browser. |
| // WebUsbServiceImpl in //chrome/browser/usb will implement this interface, and |
| // it will be used by webusb module in //third_party/blink/renderer/modules/. |
| interface WebUsbService { |
| // Retrieves information about all devices available. |
| GetDevices() => (array<device.mojom.UsbDeviceInfo> results); |
| |
| // Requests a device by guid. |
| GetDevice(string guid, device.mojom.UsbDevice& device_requestd); |
| |
| // Sets the client for this WebUsbService. |
| SetClient(device.mojom.UsbDeviceManagerClient client); |
| }; |