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

Unified Diff: chrome/browser/task_manager/task_manager_resource_providers.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/task_manager/task_manager_resource_providers.cc
===================================================================
--- chrome/browser/task_manager/task_manager_resource_providers.cc (revision 91771)
+++ chrome/browser/task_manager/task_manager_resource_providers.cc (working copy)
@@ -27,6 +27,7 @@
#include "chrome/browser/tab_contents/tab_util.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 "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/render_messages.h"
@@ -565,11 +566,11 @@
}
// Then we register for notifications to get new BackgroundContents.
- registrar_.Add(this, NotificationType::BACKGROUND_CONTENTS_OPENED,
+ registrar_.Add(this, chrome::BACKGROUND_CONTENTS_OPENED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::BACKGROUND_CONTENTS_NAVIGATED,
+ registrar_.Add(this, chrome::BACKGROUND_CONTENTS_NAVIGATED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::BACKGROUND_CONTENTS_DELETED,
+ registrar_.Add(this, chrome::BACKGROUND_CONTENTS_DELETED,
NotificationService::AllSources());
}
@@ -578,11 +579,11 @@
updating_ = false;
// Unregister for notifications
- registrar_.Remove(this, NotificationType::BACKGROUND_CONTENTS_OPENED,
+ registrar_.Remove(this, chrome::BACKGROUND_CONTENTS_OPENED,
NotificationService::AllSources());
- registrar_.Remove(this, NotificationType::BACKGROUND_CONTENTS_NAVIGATED,
+ registrar_.Remove(this, chrome::BACKGROUND_CONTENTS_NAVIGATED,
NotificationService::AllSources());
- registrar_.Remove(this, NotificationType::BACKGROUND_CONTENTS_DELETED,
+ registrar_.Remove(this, chrome::BACKGROUND_CONTENTS_DELETED,
NotificationService::AllSources());
// Delete all the resources.
@@ -638,7 +639,7 @@
const NotificationSource& source,
const NotificationDetails& details) {
switch (type.value) {
- case NotificationType::BACKGROUND_CONTENTS_OPENED: {
+ case chrome::BACKGROUND_CONTENTS_OPENED: {
// Get the name from the parent application. If no parent application is
// found, just pass an empty string - BackgroundContentsResource::GetTitle
// will display the URL instead in this case. This should never happen
@@ -663,7 +664,7 @@
task_manager_->ModelChanged();
break;
}
- case NotificationType::BACKGROUND_CONTENTS_NAVIGATED: {
+ case chrome::BACKGROUND_CONTENTS_NAVIGATED: {
BackgroundContents* contents = Details<BackgroundContents>(details).ptr();
// Should never get a NAVIGATED before OPENED.
DCHECK(resources_.find(contents) != resources_.end());
@@ -674,7 +675,7 @@
Add(contents, application_name);
break;
}
- case NotificationType::BACKGROUND_CONTENTS_DELETED:
+ case chrome::BACKGROUND_CONTENTS_DELETED:
Remove(Details<BackgroundContents>(details).ptr());
// Closing a BackgroundContents needs to force the display to refresh
// (applications may now be considered "foreground" that weren't before).
@@ -1092,11 +1093,11 @@
}
// Register for notifications about extension process changes.
- registrar_.Add(this, NotificationType::EXTENSION_PROCESS_CREATED,
+ registrar_.Add(this, chrome::EXTENSION_PROCESS_CREATED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::EXTENSION_PROCESS_TERMINATED,
+ registrar_.Add(this, chrome::EXTENSION_PROCESS_TERMINATED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::EXTENSION_HOST_DESTROYED,
+ registrar_.Add(this, chrome::EXTENSION_HOST_DESTROYED,
NotificationService::AllSources());
}
@@ -1105,11 +1106,11 @@
updating_ = false;
// Unregister for notifications about extension process changes.
- registrar_.Remove(this, NotificationType::EXTENSION_PROCESS_CREATED,
+ registrar_.Remove(this, chrome::EXTENSION_PROCESS_CREATED,
NotificationService::AllSources());
- registrar_.Remove(this, NotificationType::EXTENSION_PROCESS_TERMINATED,
+ registrar_.Remove(this, chrome::EXTENSION_PROCESS_TERMINATED,
NotificationService::AllSources());
- registrar_.Remove(this, NotificationType::EXTENSION_HOST_DESTROYED,
+ registrar_.Remove(this, chrome::EXTENSION_HOST_DESTROYED,
NotificationService::AllSources());
// Delete all the resources.
@@ -1124,11 +1125,11 @@
const NotificationSource& source,
const NotificationDetails& details) {
switch (type.value) {
- case NotificationType::EXTENSION_PROCESS_CREATED:
+ case chrome::EXTENSION_PROCESS_CREATED:
AddToTaskManager(Details<ExtensionHost>(details).ptr());
break;
- case NotificationType::EXTENSION_PROCESS_TERMINATED:
- case NotificationType::EXTENSION_HOST_DESTROYED:
+ case chrome::EXTENSION_PROCESS_TERMINATED:
+ case chrome::EXTENSION_HOST_DESTROYED:
RemoveFromTaskManager(Details<ExtensionHost>(details).ptr());
break;
default:

Powered by Google App Engine
This is Rietveld 408576698