| Index: chrome/browser/ui/browser.cc
|
| ===================================================================
|
| --- chrome/browser/ui/browser.cc (revision 91771)
|
| +++ chrome/browser/ui/browser.cc (working copy)
|
| @@ -99,6 +99,7 @@
|
| #include "chrome/browser/upgrade_detector.h"
|
| #include "chrome/browser/web_applications/web_app.h"
|
| #include "chrome/common/chrome_constants.h"
|
| +#include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/common/extensions/extension_constants.h"
|
| @@ -252,26 +253,26 @@
|
| bookmark_bar_state_(BookmarkBar::HIDDEN) {
|
| registrar_.Add(this, NotificationType::SSL_VISIBLE_STATE_CHANGED,
|
| NotificationService::AllSources());
|
| - registrar_.Add(this, NotificationType::EXTENSION_UPDATE_DISABLED,
|
| + registrar_.Add(this, chrome::EXTENSION_UPDATE_DISABLED,
|
| NotificationService::AllSources());
|
| - registrar_.Add(this, NotificationType::EXTENSION_LOADED,
|
| + registrar_.Add(this, chrome::EXTENSION_LOADED,
|
| NotificationService::AllSources());
|
| - registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
|
| + registrar_.Add(this, chrome::EXTENSION_UNLOADED,
|
| NotificationService::AllSources());
|
| - registrar_.Add(this, NotificationType::EXTENSION_UNINSTALLED,
|
| + registrar_.Add(this, chrome::EXTENSION_UNINSTALLED,
|
| NotificationService::AllSources());
|
| - registrar_.Add(this, NotificationType::EXTENSION_PROCESS_TERMINATED,
|
| + registrar_.Add(this, chrome::EXTENSION_PROCESS_TERMINATED,
|
| NotificationService::AllSources());
|
| registrar_.Add(
|
| - this, NotificationType::BROWSER_THEME_CHANGED,
|
| + this, chrome::BROWSER_THEME_CHANGED,
|
| Source<ThemeService>(ThemeServiceFactory::GetForProfile(profile_)));
|
| - registrar_.Add(this, NotificationType::TAB_CONTENT_SETTINGS_CHANGED,
|
| + registrar_.Add(this, chrome::TAB_CONTENT_SETTINGS_CHANGED,
|
| NotificationService::AllSources());
|
| - registrar_.Add(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
|
| + registrar_.Add(this, chrome::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
|
| NotificationService::AllSources());
|
|
|
| // Need to know when to alert the user of theme install delay.
|
| - registrar_.Add(this, NotificationType::EXTENSION_READY_FOR_INSTALL,
|
| + registrar_.Add(this, chrome::EXTENSION_READY_FOR_INSTALL,
|
| NotificationService::AllSources());
|
|
|
| PrefService* local_state = g_browser_process->local_state();
|
| @@ -467,7 +468,7 @@
|
| #endif
|
|
|
| NotificationService::current()->Notify(
|
| - NotificationType::BROWSER_WINDOW_READY,
|
| + chrome::BROWSER_WINDOW_READY,
|
| Source<Browser>(this),
|
| NotificationService::NoDetails());
|
|
|
| @@ -1001,7 +1002,7 @@
|
|
|
| // TODO(sky): convert session/tab restore to use notification.
|
| NotificationService::current()->Notify(
|
| - NotificationType::BROWSER_CLOSING,
|
| + chrome::BROWSER_CLOSING,
|
| Source<Browser>(this),
|
| Details<bool>(&exiting));
|
|
|
| @@ -3232,7 +3233,7 @@
|
|
|
| bool Browser::TakeFocus(bool reverse) {
|
| NotificationService::current()->Notify(
|
| - NotificationType::FOCUS_RETURNED_TO_BROWSER,
|
| + chrome::FOCUS_RETURNED_TO_BROWSER,
|
| Source<Browser>(this),
|
| NotificationService::NoDetails());
|
| return false;
|
| @@ -3560,7 +3561,7 @@
|
| UpdateToolbar(false);
|
| break;
|
|
|
| - case NotificationType::EXTENSION_UPDATE_DISABLED: {
|
| + case chrome::EXTENSION_UPDATE_DISABLED: {
|
| // Show the UI if the extension was disabled for escalated permissions.
|
| Profile* profile = Source<Profile>(source).ptr();
|
| if (profile_->IsSameProfile(profile)) {
|
| @@ -3574,7 +3575,7 @@
|
| break;
|
| }
|
|
|
| - case NotificationType::EXTENSION_UNLOADED: {
|
| + case chrome::EXTENSION_UNLOADED: {
|
| if (window()->GetLocationBar())
|
| window()->GetLocationBar()->UpdatePageActions();
|
|
|
| @@ -3593,23 +3594,23 @@
|
| break;
|
| }
|
|
|
| - case NotificationType::EXTENSION_PROCESS_TERMINATED: {
|
| + case chrome::EXTENSION_PROCESS_TERMINATED: {
|
| if (window()->GetLocationBar())
|
| window()->GetLocationBar()->InvalidatePageActions();
|
| break;
|
| }
|
|
|
| - case NotificationType::EXTENSION_UNINSTALLED:
|
| - case NotificationType::EXTENSION_LOADED:
|
| + case chrome::EXTENSION_UNINSTALLED:
|
| + case chrome::EXTENSION_LOADED:
|
| if (window()->GetLocationBar())
|
| window()->GetLocationBar()->UpdatePageActions();
|
| break;
|
|
|
| - case NotificationType::BROWSER_THEME_CHANGED:
|
| + case chrome::BROWSER_THEME_CHANGED:
|
| window()->UserChangedTheme();
|
| break;
|
|
|
| - case NotificationType::EXTENSION_READY_FOR_INSTALL: {
|
| + case chrome::EXTENSION_READY_FOR_INSTALL: {
|
| // Handle EXTENSION_READY_FOR_INSTALL for last active tabbed browser.
|
| if (BrowserList::FindTabbedBrowser(profile(), true) != this)
|
| break;
|
| @@ -3624,7 +3625,7 @@
|
| break;
|
| }
|
|
|
| - case NotificationType::PREF_CHANGED: {
|
| + case chrome::PREF_CHANGED: {
|
| const std::string& pref_name = *Details<std::string>(details).ptr();
|
| if (pref_name == prefs::kUseVerticalTabs) {
|
| UseVerticalTabsChanged();
|
| @@ -3661,7 +3662,7 @@
|
| break;
|
| }
|
|
|
| - case NotificationType::TAB_CONTENT_SETTINGS_CHANGED: {
|
| + case chrome::TAB_CONTENT_SETTINGS_CHANGED: {
|
| TabContents* tab_contents = Source<TabContents>(source).ptr();
|
| if (tab_contents == GetSelectedTabContents()) {
|
| LocationBar* location_bar = window()->GetLocationBar();
|
| @@ -3675,7 +3676,7 @@
|
| UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
|
| break;
|
|
|
| - case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
|
| + case chrome::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
|
| UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE);
|
| break;
|
|
|
|
|