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

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

Issue 900503002: List printers managed by extensions in print preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 10 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 cbc6e1bf4a4063c5a80124c51187227f9734111e..f6bf882b55bdd5779e21dcc44f88efa06c877c59 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
@@ -124,6 +124,9 @@ class PrintPreviewHandler
// Starts getting all local privet printers. |arg| is unused.
void HandleGetPrivetPrinters(const base::ListValue* args);
+ // Starts getting all local extension managed printers. |arg| is unused.
+ void HandleGetExtensionPrinters(const base::ListValue* args);
+
// Stops getting all local privet printers. |arg| is unused.
void HandleStopGetPrivetPrinters(const base::ListValue* args);
@@ -196,6 +199,10 @@ class PrintPreviewHandler
void HandleGetPrivetPrinterCapabilities(const base::ListValue* arg);
+ // Requests an extension managed printer's capabilities.
+ // |arg| contains the ID of the printer whose capabilities are requested.
+ void HandleGetExtensionPrinterCapabilities(const base::ListValue* args);
+
void SendInitialSettings(const std::string& default_printer);
// Send OAuth2 access token.
@@ -282,6 +289,20 @@ class PrintPreviewHandler
base::DictionaryValue* printer_value);
#endif
+ // Called when a list of printers is reported by an extension.
+ // |printers|: The list of printers managed by the extension.
+ // |done|: Whether all the extensions have reported the list of printers
+ // they manage.
+ void OnGotPrintersForExtension(const base::ListValue& printers, bool done);
+
+ // Called when an extension reports the set of print capabilites for a
+ // printer.
+ // |printer_id|: The id of the printer whose capabilities are reported.
+ // |capabilities|: The printer capabilities.
+ void OnGotExtensionPrinterCapabilities(
+ const std::string& printer_id,
+ const base::DictionaryValue& capabilities);
+
// Register/unregister from notifications of changes done to the GAIA
// cookie.
void RegisterForMergeSession();
« no previous file with comments | « chrome/browser/resources/print_preview/print_header.js ('k') | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698