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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.h

Issue 1148383002: Add onGetUsbPrinterInfoRequested event to printerProvider API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only include the permission granting part in this patch. 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: chrome/browser/ui/webui/print_preview/print_preview_handler.h
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
index 356678bed9cdcfc9340d98f5e06ebf06e64f4629..f86f835c7c7213f5afb2d74b6403968f07fcf9b9 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
@@ -133,6 +133,10 @@ class PrintPreviewHandler
// unused.
void HandleGetExtensionUsbPrinters(const base::ListValue* args);
+ // Grants an extension access to a USB printer. First element of |args| is
+ // the extension ID and the second element is USB device ID.
+ void HandleGrantExtensionUsbPrinterAccess(const base::ListValue* args);
+
// Stops getting all local privet printers. |arg| is unused.
void HandleStopGetPrivetPrinters(const base::ListValue* args);
@@ -317,6 +321,15 @@ class PrintPreviewHandler
// |printers|: The list of printers supported by extensions.
void OnGotExtensionUsbPrinters(const base::ListValue& printers);
+ // Called when an extension reports information for a USB printer it has just
+ // been granted access to.
+ // |extension_id|: The extension that was queried.
+ // |device_id|: The id of the USB device.
+ // |printer_info|: The data reported by the extension.
+ void OnGotExtensionUsbPrinterInfo(const std::string& extension_id,
+ int device_id,
+ const base::DictionaryValue& printer_info);
+
// Called when an extension reports the set of print capabilites for a
// printer.
// |printer_id|: The id of the printer whose capabilities are reported.

Powered by Google App Engine
This is Rietveld 408576698