diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 02:11:23 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 02:11:23 +0000 |
commit | 14f986e2173cba9b850b65fb00dca74e7db3f76e (patch) | |
tree | e5efba00bc3ca2f9ffc8f354b93ebcf9d8eefc01 /chrome/browser | |
parent | 44e8f7c1eca7651e1162333584a66084290a71d7 (diff) | |
download | chromium_src-14f986e2173cba9b850b65fb00dca74e7db3f76e.zip chromium_src-14f986e2173cba9b850b65fb00dca74e7db3f76e.tar.gz chromium_src-14f986e2173cba9b850b65fb00dca74e7db3f76e.tar.bz2 |
Revert "Use a NotificationRegistrar to listen for notifications."
This reverts commit r16709 (on pkasting's request).
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16710 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_accessibility_manager.cc | 8 | ||||
-rw-r--r-- | chrome/browser/browser_accessibility_manager.h | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/browser_accessibility_manager.cc b/chrome/browser/browser_accessibility_manager.cc index 5190870..0930024 100644 --- a/chrome/browser/browser_accessibility_manager.cc +++ b/chrome/browser/browser_accessibility_manager.cc @@ -22,13 +22,17 @@ BrowserAccessibilityManager* BrowserAccessibilityManager::GetInstance() { } BrowserAccessibilityManager::BrowserAccessibilityManager() { - registrar_.Add(this, NotificationType::RENDERER_PROCESS_TERMINATED, - NotificationService::AllSources()); + NotificationService::current()->AddObserver(this, + NotificationType::RENDERER_PROCESS_TERMINATED, + NotificationService::AllSources()); } BrowserAccessibilityManager::~BrowserAccessibilityManager() { // Clear hashmap. render_process_host_map_.clear(); + + // We don't remove ourselves as an observer because we are a Singleton object, + // and NotifcationService is likely gone by this point. } STDMETHODIMP BrowserAccessibilityManager::CreateAccessibilityInstance( diff --git a/chrome/browser/browser_accessibility_manager.h b/chrome/browser/browser_accessibility_manager.h index 4af1363..081f978 100644 --- a/chrome/browser/browser_accessibility_manager.h +++ b/chrome/browser/browser_accessibility_manager.h @@ -8,7 +8,7 @@ #include <map> #include "base/singleton.h" -#include "chrome/common/notification_registrar.h" +#include "chrome/common/notification_observer.h" #include "webkit/glue/webaccessibility.h" class BrowserAccessibility; @@ -81,8 +81,6 @@ class BrowserAccessibilityManager : public NotificationObserver { typedef std::multimap<int, BrowserAccessibility*> RenderProcessHostMap; typedef std::pair<int, BrowserAccessibility*> MapEntry; - NotificationRegistrar registrar_; - // Mapping to track which RenderProcessHosts ids are active. If a // RenderProcessHost is found to be terminated, its id (key) should be removed // from this mapping, and the connected BrowserAccessibility ids/instances |