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

Unified Diff: chrome/browser/background/background_contents_service.cc

Issue 425303002: Move extension notifications to extensions/browser/notification_types.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (extension-notifications) rebase Created 6 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/background/background_contents_service.cc
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 1b22c25cda711b4d28d498a82a1bd101a7e71715..27650a0663e0e5410ec249b8fa09fdf75ca7fbae 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -39,6 +39,7 @@
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/image_loader.h"
+#include "extensions/browser/notification_types.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_icon_set.h"
@@ -309,7 +310,8 @@ BackgroundContentsService::GetBackgroundContents() const
void BackgroundContentsService::StartObserving(Profile* profile) {
// On startup, load our background pages after extension-apps have loaded.
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
+ registrar_.Add(this,
+ extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED,
content::Source<Profile>(profile));
// Track the lifecycle of all BackgroundContents in the system to allow us
@@ -331,7 +333,8 @@ void BackgroundContentsService::StartObserving(Profile* profile) {
// Track when the extensions crash so that the user can be notified
// about it, and the crashed contents can be restarted.
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
+ registrar_.Add(this,
+ extensions::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED,
content::Source<Profile>(profile));
@@ -345,7 +348,7 @@ void BackgroundContentsService::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case chrome::NOTIFICATION_EXTENSIONS_READY: {
+ case extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED: {
Profile* profile = content::Source<Profile>(source).ptr();
LoadBackgroundContentsFromManifests(profile);
LoadBackgroundContentsFromPrefs(profile);
@@ -385,7 +388,7 @@ void BackgroundContentsService::Observe(
RegisterBackgroundContents(bgcontents);
break;
}
- case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED:
+ case extensions::NOTIFICATION_EXTENSION_PROCESS_TERMINATED:
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED: {
Profile* profile = content::Source<Profile>(source).ptr();
const Extension* extension = NULL;
« no previous file with comments | « chrome/browser/background/background_application_list_model.cc ('k') | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698