Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Side by Side Diff: chrome/browser/chromeos/printing/usb_util.h

Issue 2738323003: Implement basic USB setup in the cups printer detector. Factor out (Closed)
Patch Set: Remove dep on extensions Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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.
4
5 // Utility routines for working with UsbDevices that are printers.
6
7 #ifndef CHROME_BROWSER_CHROMEOS_PRINTING_USB_UTIL_H__
8 #define CHROME_BROWSER_CHROMEOS_PRINTING_USB_UTIL_H__
9
10 #include <string>
11
12 #include "base/memory/ref_counted.h"
13
14 namespace device {
15 class UsbDevice;
16 }
17
18 namespace chromeos {
19
20 class Printer;
21
22 bool UsbDeviceIsPrinter(scoped_refptr<device::UsbDevice> usb_device);
23
24 // Convert the interesting details of a device to a string, for
25 // logging/debugging.
26 std::string UsbPrinterDeviceDetailsAsString(const device::UsbDevice& device);
27
28 // Attempt to gather all the information we need to work with this printer by
29 // querying the USB device. This should only be called using devices we believe
30 // are printers, not arbitrary USB devices, as we may get weird partial results
31 // from arbitrary devices.
32 //
33 // Returns true on success. On false, printer may have partial results.
34 bool UsbDeviceToPrinter(const device::UsbDevice& device,
35 chromeos::Printer* printer);
36
37 } // namespace chromeos
38 #endif // CHROME_BROWSER_CHROMEOS_PRINTING_USB_UTIL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698