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

Unified Diff: chrome/browser/ui/webui/print_preview_handler.cc

Issue 7721001: PrintPreview: Make ctrl-shift-p start the native print flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 4 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_handler.cc
diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc
index aa0007fd5fa919b5b22a0984bd0177bf1219d5dd..81f6deadbdde08361e503e0b25ff6a7b9dd36cc6 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -662,7 +662,7 @@ void PrintPreviewHandler::HandleManageCloudPrint(const ListValue*) {
PageTransition::LINK);
}
-void PrintPreviewHandler::HandleShowSystemDialog(const ListValue* args) {
+void PrintPreviewHandler::HandleShowSystemDialog(const ListValue*) {
Lei Zhang 2011/08/24 01:27:28 This is just going to conflict with my cleanup CL.
kmadhusu 2011/08/25 02:15:20 okay :)
ReportStats();
ReportUserActionHistogram(FALLBACK_TO_ADVANCED_SETTINGS_DIALOG);
@@ -675,6 +675,10 @@ void PrintPreviewHandler::HandleShowSystemDialog(const ListValue* args) {
printing::PrintViewManager* manager = wrapper->print_view_manager();
manager->set_observer(this);
manager->PrintForSystemDialogNow();
+
+ // Cancel the pending preview request if exists.
+ PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(web_ui_);
+ print_preview_ui->OnPrintPreviewRequest(-1);
Lei Zhang 2011/08/24 01:27:28 Let's add a new method to PrintPreviewUI to do can
kmadhusu 2011/08/25 02:15:20 Done.
}
void PrintPreviewHandler::HandleManagePrinters(const ListValue* args) {

Powered by Google App Engine
This is Rietveld 408576698