| Index: chrome/browser/extensions/extension_toolbar_model.cc
|
| ===================================================================
|
| --- chrome/browser/extensions/extension_toolbar_model.cc (revision 91968)
|
| +++ chrome/browser/extensions/extension_toolbar_model.cc (working copy)
|
| @@ -8,6 +8,7 @@
|
| #include "chrome/browser/extensions/extension_service.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "content/common/notification_service.h"
|
| @@ -18,15 +19,15 @@
|
| extensions_initialized_(false) {
|
| DCHECK(service_);
|
|
|
| - registrar_.Add(this, NotificationType::EXTENSION_LOADED,
|
| + registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
|
| Source<Profile>(service_->profile()));
|
| - registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
|
| + registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
|
| Source<Profile>(service_->profile()));
|
| - registrar_.Add(this, NotificationType::EXTENSIONS_READY,
|
| + registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
|
| Source<Profile>(service_->profile()));
|
| - registrar_.Add(this,
|
| - NotificationType::EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
|
| - NotificationService::AllSources());
|
| + registrar_.Add(
|
| + this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
|
| + NotificationService::AllSources());
|
|
|
| visible_icon_count_ = prefs_->GetInteger(prefs::kExtensionToolbarSize);
|
| }
|
| @@ -79,10 +80,10 @@
|
| prefs_->ScheduleSavePersistentPrefs();
|
| }
|
|
|
| -void ExtensionToolbarModel::Observe(NotificationType type,
|
| +void ExtensionToolbarModel::Observe(int type,
|
| const NotificationSource& source,
|
| const NotificationDetails& details) {
|
| - if (type == NotificationType::EXTENSIONS_READY) {
|
| + if (type == chrome::NOTIFICATION_EXTENSIONS_READY) {
|
| InitializeExtensionList();
|
| return;
|
| }
|
| @@ -91,12 +92,12 @@
|
| return;
|
|
|
| const Extension* extension = NULL;
|
| - if (type == NotificationType::EXTENSION_UNLOADED) {
|
| + if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
|
| extension = Details<UnloadedExtensionInfo>(details)->extension;
|
| } else {
|
| extension = Details<const Extension>(details).ptr();
|
| }
|
| - if (type == NotificationType::EXTENSION_LOADED) {
|
| + if (type == chrome::NOTIFICATION_EXTENSION_LOADED) {
|
| // We don't want to add the same extension twice. It may have already been
|
| // added by EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED below, if the user
|
| // hides the browser action and then disables and enables the extension.
|
| @@ -106,10 +107,11 @@
|
| }
|
| if (service_->GetBrowserActionVisibility(extension))
|
| AddExtension(extension);
|
| - } else if (type == NotificationType::EXTENSION_UNLOADED) {
|
| + } else if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
|
| RemoveExtension(extension);
|
| - } else if (type ==
|
| - NotificationType::EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED) {
|
| + } else if (
|
| + type ==
|
| + chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED) {
|
| if (service_->GetBrowserActionVisibility(extension))
|
| AddExtension(extension);
|
| else
|
|
|