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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
« no previous file with comments | « chrome/browser/printing/print_job.h ('k') | chrome/browser/printing/print_job_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_job.cc
===================================================================
--- chrome/browser/printing/print_job.cc (revision 91968)
+++ chrome/browser/printing/print_job.cc (working copy)
@@ -8,6 +8,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/timer.h"
#include "chrome/browser/printing/print_job_worker.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_service.h"
#include "printing/printed_document.h"
#include "printing/printed_page.h"
@@ -59,16 +60,16 @@
UpdatePrintedDocument(new_doc);
// Don't forget to register to our own messages.
- registrar_.Add(this, NotificationType::PRINT_JOB_EVENT,
+ registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
Source<PrintJob>(this));
}
-void PrintJob::Observe(NotificationType type,
+void PrintJob::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
DCHECK_EQ(ui_message_loop_, MessageLoop::current());
- switch (type.value) {
- case NotificationType::PRINT_JOB_EVENT: {
+ switch (type) {
+ case chrome::NOTIFICATION_PRINT_JOB_EVENT: {
OnNotifyPrintJobEvent(*Details<JobEventDetails>(details).ptr());
break;
}
@@ -124,7 +125,7 @@
scoped_refptr<JobEventDetails> details(
new JobEventDetails(JobEventDetails::NEW_DOC, document_.get(), NULL));
NotificationService::current()->Notify(
- NotificationType::PRINT_JOB_EVENT,
+ chrome::NOTIFICATION_PRINT_JOB_EVENT,
Source<PrintJob>(this),
Details<JobEventDetails>(details.get()));
}
@@ -140,7 +141,7 @@
ControlledWorkerShutdown();
is_job_pending_ = false;
- registrar_.Remove(this, NotificationType::PRINT_JOB_EVENT,
+ registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
Source<PrintJob>(this));
}
// Flush the cached document.
@@ -166,7 +167,7 @@
scoped_refptr<JobEventDetails> details(
new JobEventDetails(JobEventDetails::FAILED, NULL, NULL));
NotificationService::current()->Notify(
- NotificationType::PRINT_JOB_EVENT,
+ chrome::NOTIFICATION_PRINT_JOB_EVENT,
Source<PrintJob>(this),
Details<JobEventDetails>(details.get()));
Stop();
@@ -273,7 +274,7 @@
scoped_refptr<JobEventDetails> details(
new JobEventDetails(JobEventDetails::JOB_DONE, document_.get(), NULL));
NotificationService::current()->Notify(
- NotificationType::PRINT_JOB_EVENT,
+ chrome::NOTIFICATION_PRINT_JOB_EVENT,
Source<PrintJob>(this),
Details<JobEventDetails>(details.get()));
}
« no previous file with comments | « chrome/browser/printing/print_job.h ('k') | chrome/browser/printing/print_job_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698