Index: chrome/browser/printing/print_view_manager.cc |
=================================================================== |
--- chrome/browser/printing/print_view_manager.cc (revision 72441) |
+++ chrome/browser/printing/print_view_manager.cc (working copy) |
@@ -15,6 +15,7 @@ |
#include "chrome/browser/tab_contents/tab_contents.h" |
#include "chrome/common/notification_details.h" |
#include "chrome/common/notification_source.h" |
+#include "chrome/common/render_messages.h" |
#include "chrome/common/render_messages_params.h" |
#include "grit/generated_resources.h" |
#include "printing/native_metafile.h" |
@@ -73,7 +74,7 @@ |
return GURL(); |
} |
-void PrintViewManager::DidGetPrintedPagesCount(int cookie, int number_pages) { |
+void PrintViewManager::OnDidGetPrintedPagesCount(int cookie, int number_pages) { |
DCHECK_GT(cookie, 0); |
if (!OpportunisticallyCreatePrintJob(cookie)) |
return; |
@@ -91,7 +92,7 @@ |
} |
} |
-void PrintViewManager::DidPrintPage( |
+void PrintViewManager::OnDidPrintPage( |
const ViewHostMsg_DidPrintPage_Params& params) { |
if (!OpportunisticallyCreatePrintJob(params.document_cookie)) |
return; |
@@ -143,6 +144,17 @@ |
ShouldQuitFromInnerMessageLoop(); |
} |
+bool PrintViewManager::OnMessageReceived(const IPC::Message& message) { |
+ bool handled = true; |
+ IPC_BEGIN_MESSAGE_MAP(PrintViewManager, message) |
+ IPC_MESSAGE_HANDLER(ViewHostMsg_DidGetPrintedPagesCount, |
+ OnDidGetPrintedPagesCount) |
+ IPC_MESSAGE_HANDLER(ViewHostMsg_DidPrintPage, OnDidPrintPage) |
+ IPC_MESSAGE_UNHANDLED(handled = false) |
+ IPC_END_MESSAGE_MAP() |
+ return handled; |
+} |
+ |
void PrintViewManager::Observe(NotificationType type, |
const NotificationSource& source, |
const NotificationDetails& details) { |