summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-29 01:08:01 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-29 01:08:01 +0000
commitd10b4d3a3c4407ecd78e7415cfa70d9ad84141da (patch)
tree7c64ce6bf15ddc6067342903791cae259d95a804
parentffeaed3f5521c7e76509f2d74aa3dcaaacda0de5 (diff)
downloadchromium_src-d10b4d3a3c4407ecd78e7415cfa70d9ad84141da.zip
chromium_src-d10b4d3a3c4407ecd78e7415cfa70d9ad84141da.tar.gz
chromium_src-d10b4d3a3c4407ecd78e7415cfa70d9ad84141da.tar.bz2
Cleanup: Do not pass the unused document_cookie in the "printing done" IPC message.
Review URL: http://codereview.chromium.org/6901104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83464 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/printing/print_preview_message_handler.cc4
-rw-r--r--chrome/browser/printing/print_view_manager.cc4
-rw-r--r--chrome/common/print_messages.h3
-rw-r--r--chrome/renderer/print_web_view_helper.cc4
-rw-r--r--chrome/renderer/print_web_view_helper.h2
5 files changed, 5 insertions, 12 deletions
diff --git a/chrome/browser/printing/print_preview_message_handler.cc b/chrome/browser/printing/print_preview_message_handler.cc
index 4da8285..096551b 100644
--- a/chrome/browser/printing/print_preview_message_handler.cc
+++ b/chrome/browser/printing/print_preview_message_handler.cc
@@ -62,9 +62,7 @@ void PrintPreviewMessageHandler::OnPagesReadyForPreview(
StopWorker(params.document_cookie);
RenderViewHost* rvh = tab_contents()->render_view_host();
- rvh->Send(new PrintMsg_PrintingDone(rvh->routing_id(),
- params.document_cookie,
- true));
+ rvh->Send(new PrintMsg_PrintingDone(rvh->routing_id(), true));
// Get the print preview tab.
TabContents* print_preview_tab = GetPrintPreviewTab();
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index 80fd3be..d662b79 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -353,9 +353,7 @@ void PrintViewManager::PrintingDone(bool success) {
if (!print_job_.get() || !tab_contents())
return;
RenderViewHost* rvh = tab_contents()->render_view_host();
- rvh->Send(new PrintMsg_PrintingDone(rvh->routing_id(),
- print_job_->cookie(),
- success));
+ rvh->Send(new PrintMsg_PrintingDone(rvh->routing_id(), success));
}
void PrintViewManager::TerminatePrintJob(bool cancel) {
diff --git a/chrome/common/print_messages.h b/chrome/common/print_messages.h
index eb45fd1..bde5325 100644
--- a/chrome/common/print_messages.h
+++ b/chrome/common/print_messages.h
@@ -137,8 +137,7 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview,
IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages)
// Tells the render view that printing is done so it can clean up.
-IPC_MESSAGE_ROUTED2(PrintMsg_PrintingDone,
- int /* document_cookie */,
+IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
bool /* success */)
// Tells the render view to switch the CSS to print media type, renders every
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc
index ae9a626..10548ab 100644
--- a/chrome/renderer/print_web_view_helper.cc
+++ b/chrome/renderer/print_web_view_helper.cc
@@ -239,9 +239,7 @@ void PrintWebViewHelper::OnPrintPreview(const DictionaryValue& settings) {
}
}
-void PrintWebViewHelper::OnPrintingDone(int document_cookie, bool success) {
- // Ignoring document cookie here since only one print job can be outstanding
- // per renderer and document_cookie is 0 when printing is successful.
+void PrintWebViewHelper::OnPrintingDone(bool success) {
DidFinishPrinting(success ? OK : FAIL_PRINT);
}
diff --git a/chrome/renderer/print_web_view_helper.h b/chrome/renderer/print_web_view_helper.h
index 0010be4..b5c5d33 100644
--- a/chrome/renderer/print_web_view_helper.h
+++ b/chrome/renderer/print_web_view_helper.h
@@ -109,7 +109,7 @@ class PrintWebViewHelper : public RenderViewObserver ,
// for user settings. |job_settings| has new print job settings values.
void OnPrintForPrintPreview(const DictionaryValue& job_settings);
- void OnPrintingDone(int document_cookie, bool success);
+ void OnPrintingDone(bool success);
// Main printing code -------------------------------------------------------