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

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 tests 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..954d68bea61009349110f572d73199414fcaa98f 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
@@ -7,6 +7,7 @@
#include <memory>
#include <string>
+#include <vector>
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
@@ -74,7 +75,13 @@ class PrintPreviewHandler
const GoogleServiceAuthError& error) override;
// Called when print preview failed.
- void OnPrintPreviewFailed();
+ void OnPrintPreviewFailed(int request_id);
+
+ // Called when printer settings were invalid.
+ void OnInvalidPrinterSettings(int request_id);
+
+ // 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
@@ -421,6 +428,8 @@ class PrintPreviewHandler
// notify the test if it was a successful save, only that it was attempted.
base::Closure pdf_file_saved_closure_;
+ std::vector<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