summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 19:24:47 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 19:24:47 +0000
commit2e3f45720cf36a92af6626a42ae42dd08974c300 (patch)
treea6d5cd8b9ea6753d3a444ea68e4ab1c153a684e9 /chrome/browser/printing
parent160d5f66f97488dc1d1c4515150394bdb8c1ef3c (diff)
downloadchromium_src-2e3f45720cf36a92af6626a42ae42dd08974c300.zip
chromium_src-2e3f45720cf36a92af6626a42ae42dd08974c300.tar.gz
chromium_src-2e3f45720cf36a92af6626a42ae42dd08974c300.tar.bz2
Cleanup: Move the last bits of chrome printing code out of content/.
BUG=76795 TEST=none Review URL: http://codereview.chromium.org/6731034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79436 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing')
-rw-r--r--chrome/browser/printing/print_view_manager.cc10
-rw-r--r--chrome/browser/printing/print_view_manager.h13
2 files changed, 9 insertions, 14 deletions
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index e315187..28074c5 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -41,17 +41,14 @@ PrintViewManager::~PrintViewManager() {
DisconnectFromCurrentPrintJob();
}
-void PrintViewManager::Stop() {
+void PrintViewManager::StopNavigation() {
// Cancel the current job, wait for the worker to finish.
TerminatePrintJob(true);
}
-bool PrintViewManager::OnRenderViewGone(RenderViewHost* render_view_host) {
+void PrintViewManager::RenderViewGone() {
if (!print_job_.get())
- return true;
-
- if (render_view_host != tab_contents()->render_view_host())
- return false;
+ return;
scoped_refptr<PrintedDocument> document(print_job_->document());
if (document) {
@@ -60,7 +57,6 @@ bool PrintViewManager::OnRenderViewGone(RenderViewHost* render_view_host) {
// the print job may finish without problem.
TerminatePrintJob(!document->IsComplete());
}
- return true;
}
string16 PrintViewManager::RenderSourceName() {
diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h
index 29747d7..d9c91be 100644
--- a/chrome/browser/printing/print_view_manager.h
+++ b/chrome/browser/printing/print_view_manager.h
@@ -32,13 +32,6 @@ class PrintViewManager : public NotificationObserver,
explicit PrintViewManager(TabContents* tab_contents);
virtual ~PrintViewManager();
- // Cancels the print job.
- void Stop();
-
- // Terminates or cancels the print job if one was pending, depending on the
- // current state. Returns false if the renderer was not valuable.
- bool OnRenderViewGone(RenderViewHost* render_view_host);
-
// PrintedPagesSource implementation.
virtual string16 RenderSourceName();
virtual GURL RenderSourceUrl();
@@ -51,6 +44,12 @@ class PrintViewManager : public NotificationObserver,
// TabContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message);
+ // Terminates or cancels the print job if one was pending.
+ void RenderViewGone();
+
+ // Cancels the print job.
+ virtual void StopNavigation();
+
private:
void OnDidGetPrintedPagesCount(int cookie, int number_pages);
void OnDidPrintPage(const PrintHostMsg_DidPrintPage_Params& params);