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

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

Issue 7056070: PrintPreview: Preview generation should not block print button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' 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/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 afab88d9c9434785334c2d4f4111bdf37ff3bfd9..f0d2edb6cd06655294c487ec2277a6926ab86953 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -158,6 +158,16 @@ bool PrintPreviewTabController::IsPrintPreviewTab(TabContents* tab) {
url.host() == chrome::kChromeUIPrintHost);
}
+void PrintPreviewTabController::EraseInitiatorTabInfo(
+ TabContents* preview_tab) {
+ PrintPreviewTabMap::iterator it = preview_tab_map_.find(preview_tab);
+ if (it == preview_tab_map_.end())
+ return;
+
+ RemoveObservers(it->second);
+ preview_tab_map_[preview_tab] = NULL;
+}
+
TabContents* PrintPreviewTabController::GetInitiatorTab(
TabContents* preview_tab) {
PrintPreviewTabMap::iterator it = preview_tab_map_.find(preview_tab);

Powered by Google App Engine
This is Rietveld 408576698