diff options
Diffstat (limited to 'chrome/browser/printing/print_job_manager.cc')
-rw-r--r-- | chrome/browser/printing/print_job_manager.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/printing/print_job_manager.cc b/chrome/browser/printing/print_job_manager.cc index 978f889..c2ff3a8 100644 --- a/chrome/browser/printing/print_job_manager.cc +++ b/chrome/browser/printing/print_job_manager.cc @@ -11,6 +11,7 @@ #include "chrome/browser/printing/printed_document.h" #include "chrome/browser/printing/printed_page.h" #include "chrome/common/gfx/emf.h" +#include "chrome/common/notification_service.h" namespace printing { @@ -18,11 +19,11 @@ PrintJobManager::PrintJobManager() : debug_dump_path_() { NotificationService::current()->AddObserver( this, - NOTIFY_PRINT_JOB_EVENT, + NotificationType::PRINT_JOB_EVENT, NotificationService::AllSources()); NotificationService::current()->AddObserver( this, - NOTIFY_PRINTED_DOCUMENT_UPDATED, + NotificationType::PRINTED_DOCUMENT_UPDATED, NotificationService::AllSources()); } @@ -33,11 +34,11 @@ PrintJobManager::~PrintJobManager() { queued_queries_.clear(); NotificationService::current()->RemoveObserver( this, - NOTIFY_PRINT_JOB_EVENT, + NotificationType::PRINT_JOB_EVENT, NotificationService::AllSources()); NotificationService::current()->RemoveObserver( this, - NOTIFY_PRINTED_DOCUMENT_UPDATED, + NotificationType::PRINTED_DOCUMENT_UPDATED, NotificationService::AllSources()); } @@ -61,11 +62,11 @@ void PrintJobManager::OnQuit() { current_jobs_.clear(); NotificationService::current()->RemoveObserver( this, - NOTIFY_PRINT_JOB_EVENT, + NotificationType::PRINT_JOB_EVENT, NotificationService::AllSources()); NotificationService::current()->RemoveObserver( this, - NOTIFY_PRINTED_DOCUMENT_UPDATED, + NotificationType::PRINTED_DOCUMENT_UPDATED, NotificationService::AllSources()); DCHECK_EQ(current_jobs_.size(), 0); } @@ -98,13 +99,13 @@ void PrintJobManager::PopPrinterQuery(int document_cookie, void PrintJobManager::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - switch (type) { - case NOTIFY_PRINT_JOB_EVENT: { + switch (type.value) { + case NotificationType::PRINT_JOB_EVENT: { OnPrintJobEvent(Source<PrintJob>(source).ptr(), *Details<JobEventDetails>(details).ptr()); break; } - case NOTIFY_PRINTED_DOCUMENT_UPDATED: { + case NotificationType::PRINTED_DOCUMENT_UPDATED: { PrintedPage* printed_page = Details<PrintedPage>(details).ptr(); if (printed_page) OnPrintedDocumentUpdated(*Source<PrintedDocument>(source).ptr(), |