| Index: chrome/browser/chromeos/printing/usb_util.h
|
| diff --git a/chrome/browser/chromeos/printing/usb_util.h b/chrome/browser/chromeos/printing/usb_util.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1536e045b30b7eb81752b9bc10de6d8a81ae3076
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/printing/usb_util.h
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2017 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.
|
| +
|
| +// Utility routines for working with UsbDevices that are printers.
|
| +
|
| +#ifndef CHROME_BROWSER_CHROMEOS_PRINTING_USB_UTIL_H__
|
| +#define CHROME_BROWSER_CHROMEOS_PRINTING_USB_UTIL_H__
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/logging.h"
|
| +#include "base/memory/ref_counted.h"
|
| +#include "base/strings/stringprintf.h"
|
| +#include "base/strings/utf_string_conversions.h"
|
| +#include "chromeos/printing/printer_configuration.h"
|
| +#include "device/usb/usb_device.h"
|
| +
|
| +namespace chromeos {
|
| +
|
| +bool UsbDeviceIsPrinter(scoped_refptr<device::UsbDevice> usb_device);
|
| +
|
| +// Convert the interesting details of a device to a string, for
|
| +// logging/debugging.
|
| +std::string UsbPrinterDeviceDetailsAsString(const device::UsbDevice& device);
|
| +
|
| +// Attempt to gather all the information we need to work with this printer by
|
| +// querying the USB device. This should only be called using devices we believe
|
| +// are printers, not arbitrary USB devices, as we may get weird partial results
|
| +// from arbitrary devices.
|
| +//
|
| +// Returns true on success. On false, printer may have partial results.
|
| +bool UsbDeviceToPrinter(const device::UsbDevice& device,
|
| + chromeos::Printer* printer);
|
| +
|
| +} // namespace chromeos
|
| +#endif // CHROME_BROWSER_CHROMEOS_PRINTING_USB_UTIL_H__
|
|
|