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

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

Issue 2457933004: Register and select printer on click. (Closed)
Patch Set: rebase Created 4 years, 1 month 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/printer_backend_proxy.h
diff --git a/chrome/browser/ui/webui/print_preview/printer_backend_proxy.h b/chrome/browser/ui/webui/print_preview/printer_backend_proxy.h
index e950b60163c889e5000b1c5296512fbcb2982a97..eb12570f8cde552cc92557d3aabddf491353a0e2 100644
--- a/chrome/browser/ui/webui/print_preview/printer_backend_proxy.h
+++ b/chrome/browser/ui/webui/print_preview/printer_backend_proxy.h
@@ -8,6 +8,7 @@
#include <memory>
#include <string>
+#include "base/callback_forward.h"
#include "base/values.h"
#include "printing/backend/print_backend.h"
@@ -15,12 +16,22 @@ class Profile;
namespace printing {
+using PrinterSetupCallback =
+ base::Callback<void(std::unique_ptr<base::DictionaryValue>)>;
+
// Returns the name of the default printer.
std::string GetDefaultPrinterOnBlockingPoolThread();
// Returns printers for display in the print dialog.
PrinterList EnumeratePrintersOnBlockingPoolThread(Profile* profile);
+// Verifies printer setup then retrieves printer capabilities for
Lei Zhang 2016/11/03 23:41:46 Maybe say "Verifies printer setup if needed ..." s
skau 2016/11/04 19:28:59 Done.
+// |printer_name|. |cb| is called with the capabilities dictionary or nullptr
+// if one of the steps failed.
+void ConfigurePrinterAndFetchCapabilities(Profile* profile,
+ const std::string& printer_name,
+ const PrinterSetupCallback& cb);
+
} // namespace printing
#endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698