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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.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/ui/webui/extensions/extension_settings_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index 213e65ba42e9e37e8b8b394ec15ddd870e2c9e09..3ac289db6b8d8d0e31627595373b881d66920bf6 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -682,7 +682,7 @@ void ExtensionSettingsHandler::Observe(
web_contents()->GetRenderViewHost();
// Fall through.
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED:
- case chrome::NOTIFICATION_EXTENSION_HOST_CREATED:
+ case extensions::NOTIFICATION_EXTENSION_HOST_CREATED:
source_profile = content::Source<Profile>(source).ptr();
if (!profile->IsSameProfile(source_profile))
return;
@@ -696,11 +696,11 @@ void ExtensionSettingsHandler::Observe(
MaybeUpdateAfterNotification();
break;
}
- case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED:
- case chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED:
+ case extensions::NOTIFICATION_EXTENSION_UPDATE_DISABLED:
+ case extensions::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED:
MaybeUpdateAfterNotification();
break;
- case chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED:
+ case extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED:
// This notification is sent when the extension host destruction begins,
// not when it finishes. We use PostTask to delay the update until after
// the destruction finishes.
@@ -1214,9 +1214,11 @@ void ExtensionSettingsHandler::MaybeRegisterForNotifications() {
Profile* profile = Profile::FromWebUI(web_ui());
// Register for notifications that we need to reload the page.
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
+ registrar_.Add(this,
+ extensions::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
content::Source<Profile>(profile));
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
+ registrar_.Add(this,
+ extensions::NOTIFICATION_EXTENSION_HOST_CREATED,
content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
@@ -1226,10 +1228,10 @@ void ExtensionSettingsHandler::MaybeRegisterForNotifications() {
content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(
this,
- chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
+ extensions::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
content::Source<ExtensionPrefs>(ExtensionPrefs::Get(profile)));
registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
+ extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED,
content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this,
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,

Powered by Google App Engine
This is Rietveld 408576698