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

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

Issue 7202012: Print Preview: Display a throbber when the user requests the system print (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 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_handler.cc
diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc
index aff52a54bf386e83837138abda7a394647e98c50..bd281a0f3d199598edc9dd099423dc390b7c59b4 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -552,13 +552,10 @@ void PrintPreviewHandler::HandleShowSystemDialog(const ListValue* args) {
TabContents* initiator_tab = GetInitiatorTab();
if (!initiator_tab)
return;
- initiator_tab->Activate();
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(initiator_tab);
- wrapper->print_view_manager()->PrintNow();
-
- ClosePrintPreviewTab();
+ wrapper->print_view_manager()->PrintNow(this);
}
void PrintPreviewHandler::HandleManagePrinters(const ListValue* args) {
@@ -631,6 +628,15 @@ void PrintPreviewHandler::ClosePrintPreviewTab() {
&preview_tab()->controller()), TabStripModel::CLOSE_NONE);
}
+void PrintPreviewHandler::OnPrintDialogShown() {
+ TabContents* initiator_tab = GetInitiatorTab();
+ if (!initiator_tab)
+ return;
+
+ initiator_tab->Activate();
+ ClosePrintPreviewTab();
+}
+
void PrintPreviewHandler::SelectFile(const FilePath& default_filename) {
SelectFileDialog::FileTypeInfo file_type_info;
file_type_info.extensions.resize(1);

Powered by Google App Engine
This is Rietveld 408576698