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

Unified Diff: chrome/browser/printing/background_printing_manager.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
Index: chrome/browser/printing/background_printing_manager.cc
===================================================================
--- chrome/browser/printing/background_printing_manager.cc (revision 91968)
+++ chrome/browser/printing/background_printing_manager.cc (working copy)
@@ -10,6 +10,7 @@
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_details.h"
#include "content/common/notification_source.h"
@@ -36,9 +37,9 @@
printing_contents_.insert(contents);
- registrar_.Add(this, NotificationType::PRINT_JOB_RELEASED,
+ registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_RELEASED,
Source<TabContentsWrapper>(contents));
- registrar_.Add(this, NotificationType::TAB_CONTENTS_DESTROYED,
+ registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(contents->tab_contents()));
// Detach |contents| from its tab strip.
@@ -61,13 +62,13 @@
initiator_tab->Activate();
}
-void BackgroundPrintingManager::Observe(NotificationType type,
+void BackgroundPrintingManager::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::PRINT_JOB_RELEASED: {
+ switch (type) {
+ case chrome::NOTIFICATION_PRINT_JOB_RELEASED: {
TabContentsWrapper* tab = Source<TabContentsWrapper>(source).ptr();
- registrar_.Remove(this, NotificationType::PRINT_JOB_RELEASED,
+ registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_RELEASED,
Source<TabContentsWrapper>(tab));
// This might be happening in the middle of a RenderViewGone() loop.
@@ -75,16 +76,16 @@
MessageLoop::current()->DeleteSoon(FROM_HERE, tab);
break;
}
- case NotificationType::TAB_CONTENTS_DESTROYED: {
+ case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: {
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(
Source<TabContents>(source).ptr());
- if (registrar_.IsRegistered(this, NotificationType::PRINT_JOB_RELEASED,
+ if (registrar_.IsRegistered(this, chrome::NOTIFICATION_PRINT_JOB_RELEASED,
Source<TabContentsWrapper>(tab))) {
- registrar_.Remove(this, NotificationType::PRINT_JOB_RELEASED,
+ registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_RELEASED,
Source<TabContentsWrapper>(tab));
}
- registrar_.Remove(this, NotificationType::TAB_CONTENTS_DESTROYED,
+ registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
Source<TabContents>(tab->tab_contents()));
printing_contents_.erase(tab);
break;
« no previous file with comments | « chrome/browser/printing/background_printing_manager.h ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698