diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 01:55:31 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 01:55:31 +0000 |
commit | 45590a861539415fb074cb4f8f2d83c431404f8e (patch) | |
tree | 8a82e42b14909df9862dcaacd8680ffa5a3cb69b /ash/system/tray_accessibility.cc | |
parent | a89fc608f7161628208e45ccb283fb23c2bc3c96 (diff) | |
download | chromium_src-45590a861539415fb074cb4f8f2d83c431404f8e.zip chromium_src-45590a861539415fb074cb4f8f2d83c431404f8e.tar.gz chromium_src-45590a861539415fb074cb4f8f2d83c431404f8e.tar.bz2 |
Remove observers from SystemTrayNotifier on destruction
R=stevenjb@chromium.org
BUG=145978
TEST=none
Review URL: https://chromiumcodereview.appspot.com/11515004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/tray_accessibility.cc')
-rw-r--r-- | ash/system/tray_accessibility.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ash/system/tray_accessibility.cc b/ash/system/tray_accessibility.cc index 6bb88d6..644e7eb 100644 --- a/ash/system/tray_accessibility.cc +++ b/ash/system/tray_accessibility.cc @@ -8,6 +8,7 @@ #include "ash/shell_delegate.h" #include "ash/system/tray/system_tray.h" #include "ash/system/tray/system_tray_delegate.h" +#include "ash/system/tray/system_tray_notifier.h" #include "ash/system/tray/tray_constants.h" #include "ash/system/tray/tray_details_view.h" #include "ash/system/tray/tray_item_more.h" @@ -227,9 +228,12 @@ TrayAccessibility::TrayAccessibility(SystemTray* system_tray) login_(GetCurrentLoginStatus()) { DCHECK(Shell::GetInstance()->delegate()); DCHECK(system_tray); + Shell::GetInstance()->system_tray_notifier()->AddAccessibilityObserver(this); } TrayAccessibility::~TrayAccessibility() { + Shell::GetInstance()->system_tray_notifier()-> + RemoveAccessibilityObserver(this); } bool TrayAccessibility::GetInitialVisibility() { |