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

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: Switch away from NOTREACHED() and document API expectations. 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..a5728cbd1f1a591360ea373ea3a44469640f82b0 100644
--- a/extensions/common/api/printer_provider.idl
+++ b/extensions/common/api/printer_provider.idl
@@ -60,6 +60,8 @@ namespace printerProvider {
callback PrintersCallback = void(PrinterInfo[] printerInfo);
+ callback PrinterInfoCallback = void(optional PrinterInfo printerInfo);
+
// |capabilities|: Device capabilities in
// <a href="https://developers.google.com/cloud-print/docs/cdd#cdd">CDD
// format</a>.
@@ -73,6 +75,19 @@ namespace printerProvider {
// call callback exactly once.
static void onGetPrintersRequested(PrintersCallback resultCallback);
+ // Event fired when print manager requests information about a USB device
+ // that may be a printer. An application should not rely on this event being
+ // fired more than once per device. If a connected device is supported it
+ // should be returned in the onGetPrintersRequested event.
tbarzic 2015/05/28 22:42:22 $(ref:onGetPrintersRequested)
Reilly Grant (use Gerrit) 2015/05/28 22:47:01 Done.
+ // |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
+ // device is not supported.
+ static void onGetUsbPrinterInfoRequested(
+ 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
« no previous file with comments | « extensions/browser/extension_function_histogram_value.h ('k') | extensions/common/api/printer_provider_internal.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698