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

Unified Diff: chrome/browser/extensions/extension_toolbar_model.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
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.h ('k') | chrome/browser/extensions/extension_updater.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.h ('k') | chrome/browser/extensions/extension_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698