diff options
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 |