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

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

Issue 2962983002: Print Preview: change getPreview to cr.sendWithPromise (Closed)
Patch Set: Fix check Created 3 years, 6 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 3fc478f6df48099b254b681173b765a7a2be6c43..34725e3ab04c4df43c1687b63a2bc422dd10ec5f 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
#include <memory>
+#include <queue>
#include <string>
#include "base/files/file_path.h"
@@ -76,6 +77,15 @@ class PrintPreviewHandler
// Called when print preview failed.
void OnPrintPreviewFailed();
+ // Called when print preview is cancelled due to a new request.
+ void OnPrintPreviewCancelled();
+
+ // Called when printer settings were invalid.
+ void OnInvalidPrinterSettings();
+
+ // Called when print preview is ready.
+ void OnPrintPreviewReady(int preview_uid, int request_id);
+
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
// Called when the user press ctrl+shift+p to display the native system
// dialog.
@@ -421,6 +431,8 @@ class PrintPreviewHandler
// notify the test if it was a successful save, only that it was attempted.
base::Closure pdf_file_saved_closure_;
+ std::queue<std::string> preview_callbacks_;
+
#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
// Callback ID to be used to notify UI that privet search is finished.
std::string privet_search_callback_id_;

Powered by Google App Engine
This is Rietveld 408576698