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

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

Issue 7104074: Attempt at fixing crash. It looks like the printing code can delete (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another comment tweak 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_view_manager.cc
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index d460c46665b192e9c0f2ea1c293624a5da2ae633..b284d1dbfdc838179cfd8bf412eec47f63830cf9 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/printing/print_job_manager.h"
#include "chrome/browser/printing/print_preview_tab_controller.h"
#include "chrome/browser/printing/printer_query.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/webui/print_preview_ui.h"
#include "chrome/common/print_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
@@ -40,8 +41,9 @@ string16 GenerateRenderSourceName(TabContents* tab_contents) {
namespace printing {
-PrintViewManager::PrintViewManager(TabContents* tab_contents)
- : TabContentsObserver(tab_contents),
+PrintViewManager::PrintViewManager(TabContentsWrapper* tab)
+ : TabContentsObserver(tab->tab_contents()),
+ tab_(tab),
number_pages_(0),
printing_succeeded_(false),
inside_inner_message_loop_(false),
@@ -226,7 +228,7 @@ void PrintViewManager::OnNotifyPrintJobEvent(
NotificationService::current()->Notify(
NotificationType::PRINT_JOB_RELEASED,
- Source<TabContents>(tab_contents()),
+ Source<TabContentsWrapper>(tab_),
NotificationService::NoDetails());
break;
}
@@ -256,7 +258,7 @@ void PrintViewManager::OnNotifyPrintJobEvent(
NotificationService::current()->Notify(
NotificationType::PRINT_JOB_RELEASED,
- Source<TabContents>(tab_contents()),
+ Source<TabContentsWrapper>(tab_),
NotificationService::NoDetails());
break;
}
« no previous file with comments | « chrome/browser/printing/print_view_manager.h ('k') | chrome/browser/ui/tab_contents/tab_contents_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698