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/views/view_storage.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/views/view_storage.cc')
-rw-r--r-- | chrome/views/view_storage.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/views/view_storage.cc b/chrome/views/view_storage.cc index f19c5c4..ed445f3 100644 --- a/chrome/views/view_storage.cc +++ b/chrome/views/view_storage.cc @@ -6,7 +6,7 @@ #include <algorithm> -#include "chrome/common/notification_types.h" +#include "chrome/common/notification_service.h" #include "chrome/common/stl_util-inl.h" namespace views { @@ -52,14 +52,13 @@ void ViewStorage::DeleteSharedInstance() { } ViewStorage::ViewStorage() : view_storage_next_id_(0) { - NotificationService::current()-> - AddObserver(this, NOTIFY_VIEW_REMOVED, NotificationService::AllSources()); + NotificationService::current()->AddObserver( + this, NotificationType::VIEW_REMOVED, NotificationService::AllSources()); } ViewStorage::~ViewStorage() { - NotificationService::current()-> - RemoveObserver(this, NOTIFY_VIEW_REMOVED, - NotificationService::AllSources()); + NotificationService::current()->RemoveObserver( + this, NotificationType::VIEW_REMOVED, NotificationService::AllSources()); STLDeleteContainerPairSecondPointers(id_to_view_location_.begin(), id_to_view_location_.end()); @@ -187,7 +186,7 @@ void ViewStorage::EraseView(int storage_id, bool remove_all_ids) { void ViewStorage::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - DCHECK(type == NOTIFY_VIEW_REMOVED); + DCHECK(type == NotificationType::VIEW_REMOVED); // Let's first retrieve the ids for that view. std::map<View*, std::vector<int>*>::iterator ids_iter = |