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

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

Issue 7574002: Be able to print items that do window.print(); window.close() (airline tix e.g.) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Kausalya's comments. 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 d904c18a5f2d9bc59a888d9aba7055fb5cdca3f3..cab5bd46a0bb11a6b937d8e2169eaec5f76f9c00 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -914,7 +914,7 @@ void PrintPreviewHandler::HidePreviewTab() {
TabContentsWrapper::GetCurrentWrapperForContents(preview_tab());
if (GetBackgroundPrintingManager()->HasTabContents(preview_tab_wrapper))
return;
- GetBackgroundPrintingManager()->OwnTabContents(preview_tab_wrapper);
+ GetBackgroundPrintingManager()->OwnPreviewTabContents(preview_tab_wrapper);
}
void PrintPreviewHandler::ClearInitiatorTabDetails() {
@@ -927,6 +927,11 @@ void PrintPreviewHandler::ClearInitiatorTabDetails() {
// another preview tab.
printing::PrintPreviewTabController* tab_controller =
printing::PrintPreviewTabController::GetInstance();
- if (tab_controller)
+ if (tab_controller) {
+ TabContentsWrapper* initiator_wrapper =
+ TabContentsWrapper::GetCurrentWrapperForContents(initiator_tab);
tab_controller->EraseInitiatorTabInfo(preview_tab());
+ g_browser_process->background_printing_manager()->
+ ReleaseInitiatorTabContents(initiator_wrapper);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698