diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
commit | bfd04a62ce610d7bb61dbb78811dccbed23589b7 (patch) | |
tree | 70bb228c0f00ba1c12c584efd569daccf96b4026 /chrome/browser/browser_list.cc | |
parent | a814d863440f0a154a7299f2d8b440f405c7700e (diff) | |
download | chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.zip chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.gz chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.bz2 |
Remove most header file dependencies on the notification type list. It is
really painful to add more types, since lots of headers include the
notification service to derive from the notification observer. This splits that
out, so much less of the project should end up including notification_types.h
---Paths modified but not in any changelist:
Review URL: http://codereview.chromium.org/19744
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_list.cc')
-rw-r--r-- | chrome/browser/browser_list.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/chrome/browser/browser_list.cc b/chrome/browser/browser_list.cc index de66406..02a1658 100644 --- a/chrome/browser/browser_list.cc +++ b/chrome/browser/browser_list.cc @@ -31,8 +31,9 @@ void BrowserList::AddBrowser(Browser* browser) { g_browser_process->AddRefModule(); NotificationService::current()->Notify( - NOTIFY_BROWSER_OPENED, - Source<Browser>(browser), NotificationService::NoDetails()); + NotificationType::BROWSER_OPENED, + Source<Browser>(browser), + NotificationService::NoDetails()); // Send out notifications after add has occurred. Do some basic checking to // try to catch evil observers that change the list from under us. @@ -49,7 +50,7 @@ void BrowserList::RemoveBrowser(Browser* browser) { bool close_app = (browsers_.size() == 1); NotificationService::current()->Notify( - NOTIFY_BROWSER_CLOSED, + NotificationType::BROWSER_CLOSED, Source<Browser>(browser), Details<bool>(&close_app)); // Send out notifications before anything changes. Do some basic checking to @@ -65,9 +66,10 @@ void BrowserList::RemoveBrowser(Browser* browser) { // If the last Browser object was destroyed, make sure we try to close any // remaining dependent windows too. if (browsers_.empty()) { - NotificationService::current()->Notify(NOTIFY_ALL_APPWINDOWS_CLOSED, - NotificationService::AllSources(), - NotificationService::NoDetails()); + NotificationService::current()->Notify( + NotificationType::ALL_APPWINDOWS_CLOSED, + NotificationService::AllSources(), + NotificationService::NoDetails()); } g_browser_process->ReleaseModule(); @@ -142,9 +144,10 @@ void BrowserList::WindowsSessionEnding() { // Send out notification. This is used during testing so that the test harness // can properly shutdown before we exit. - NotificationService::current()->Notify(NOTIFY_SESSION_END, - NotificationService::AllSources(), - NotificationService::NoDetails()); + NotificationService::current()->Notify( + NotificationType::SESSION_END, + NotificationService::AllSources(), + NotificationService::NoDetails()); // And shutdown. browser_shutdown::Shutdown(); |