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

Unified Diff: chrome/browser/printing/print_preview_tab_controller.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 fix. 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
« no previous file with comments | « no previous file | chrome/browser/printing/print_view_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_preview_tab_controller.cc
diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc
index 0d94be172f689e541f0bf6fe1d5f13e7c51cd1d1..78d7fab2667d2d4092ac1dcc286c5c1790e553b1 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -138,6 +138,16 @@ void PrintPreviewTabController::Observe(NotificationType type,
if (initiator_tab)
RemoveObservers(initiator_tab);
+ // |source_tab_is_preview_tab| is misleading in the case where the user
+ // chooses to re-open the initiator tab after closing it, as |source_tab|
+ // has navigated to the URL of the initiator tab at this point. Make sure to
+ // verify that |source_tab| really is a print preview tab.
+ if (IsPrintPreviewTab(source_tab)) {
+ PrintPreviewUI* print_preview_ui =
+ static_cast<PrintPreviewUI*>(source_tab->web_ui());
+ print_preview_ui->OnNavigation();
+ }
+
// Erase the map entry.
preview_tab_map_.erase(source_tab);
} else {
« no previous file with comments | « no previous file | chrome/browser/printing/print_view_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698