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

Unified Diff: chrome/browser/printing/print_preview_message_handler.cc

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
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/native_layer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_preview_message_handler.cc
diff --git a/chrome/browser/printing/print_preview_message_handler.cc b/chrome/browser/printing/print_preview_message_handler.cc
index 89cc4977ce55084e3bcb7b912c5ce9b230723f15..ae2ff22c74b9de34136a4e72c64221b946fb4d9f 100644
--- a/chrome/browser/printing/print_preview_message_handler.cc
+++ b/chrome/browser/printing/print_preview_message_handler.cc
@@ -190,6 +190,12 @@ void PrintPreviewMessageHandler::OnDidGetDefaultPageLayout(
void PrintPreviewMessageHandler::OnPrintPreviewCancelled(int document_cookie) {
// Always need to stop the worker.
StopWorker(document_cookie);
+
+ // Notify UI
+ PrintPreviewUI* print_preview_ui = GetPrintPreviewUI();
+ if (!print_preview_ui)
+ return;
+ print_preview_ui->OnPrintPreviewCancelled();
}
void PrintPreviewMessageHandler::OnInvalidPrinterSettings(int document_cookie) {
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/native_layer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698