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

Unified Diff: chrome/browser/task_manager/task_manager_notification_resource_provider.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_notification_resource_provider.cc
===================================================================
--- chrome/browser/task_manager/task_manager_notification_resource_provider.cc (revision 91968)
+++ chrome/browser/task_manager/task_manager_notification_resource_provider.cc (working copy)
@@ -10,6 +10,7 @@
#include "chrome/browser/notifications/balloon_collection.h"
#include "chrome/browser/notifications/balloon_host.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/common/notification_service.h"
@@ -103,9 +104,9 @@
}
// Register for notifications about extension process changes.
- registrar_.Add(this, NotificationType::NOTIFY_BALLOON_CONNECTED,
+ registrar_.Add(this, chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::NOTIFY_BALLOON_DISCONNECTED,
+ registrar_.Add(this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
NotificationService::AllSources());
}
@@ -114,9 +115,9 @@
updating_ = false;
// Unregister for notifications about extension process changes.
- registrar_.Remove(this, NotificationType::NOTIFY_BALLOON_CONNECTED,
+ registrar_.Remove(this, chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED,
NotificationService::AllSources());
- registrar_.Remove(this, NotificationType::NOTIFY_BALLOON_DISCONNECTED,
+ registrar_.Remove(this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
NotificationService::AllSources());
// Delete all the resources.
@@ -125,14 +126,14 @@
}
void TaskManagerNotificationResourceProvider::Observe(
- NotificationType type,
+ int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::NOTIFY_BALLOON_CONNECTED:
+ switch (type) {
+ case chrome::NOTIFICATION_NOTIFY_BALLOON_CONNECTED:
AddToTaskManager(Source<BalloonHost>(source).ptr());
break;
- case NotificationType::NOTIFY_BALLOON_DISCONNECTED:
+ case chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED:
RemoveFromTaskManager(Source<BalloonHost>(source).ptr());
break;
default:
« no previous file with comments | « chrome/browser/task_manager/task_manager_browsertest.cc ('k') | chrome/browser/task_manager/task_manager_resource_providers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698