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

Unified Diff: extensions/common/api/printer_provider.idl

Issue 1148383002: Add onGetUsbPrinterInfoRequested event to printerProvider API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: extensions/common/api/printer_provider.idl
diff --git a/extensions/common/api/printer_provider.idl b/extensions/common/api/printer_provider.idl
index 40a07c5f5be874813d353c37288c2f70eb223c1d..aa1e31e17cf3e06ca4b9355c000af5eef0ce976d 100644
--- a/extensions/common/api/printer_provider.idl
+++ b/extensions/common/api/printer_provider.idl
@@ -34,6 +34,10 @@ namespace printerProvider {
// Printer's human readable description.
DOMString? description;
+
+ // USB device corresponding to this printer. This should be the
+ // opaque ID found in the $(ref:usb.Device) dictionary.
+ long? usbDevice;
};
// Printing request parameters. Passed to $(ref:onPrintRequested) event.
@@ -60,6 +64,8 @@ namespace printerProvider {
callback PrintersCallback = void(PrinterInfo[] printerInfo);
+ callback PrinterInfoCallback = void(PrinterInfo printerInfo);
+
// |capabilities|: Device capabilities in
// <a href="https://developers.google.com/cloud-print/docs/cdd#cdd">CDD
// format</a>.
@@ -73,6 +79,15 @@ namespace printerProvider {
// call callback exactly once.
static void onGetPrintersRequested(PrintersCallback resultCallback);
+ // Event fired when print manager grants access to a USB device.
+ // |device|: The USB device.
+ // |resultCallback|: Callback to return printer info. The receiving listener
+ // must call callback exactly once. If the parameter to this callback is
+ // undefined that indicates that the application has determined that the
Vitaly Buka (NO REVIEWS) 2015/05/21 00:52:02 Looks like this even should be in chrome.usb Idea
Reilly Grant (use Gerrit) 2015/05/21 00:58:22 I could add this event to chrome.usb but I would n
+ // device is not supported.
+ static void onUsbAccessGranted(usb.Device device,
+ PrinterInfoCallback resultCallback);
+
// Event fired when print manager requests printer capabilities.
// |printerId|: Unique ID of the printer whose capabilities are requested.
// |resultCallback|: Callback to return device capabilities in

Powered by Google App Engine
This is Rietveld 408576698