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/audio | |
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/audio')
-rw-r--r-- | ash/system/audio/tray_volume.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ash/system/audio/tray_volume.cc b/ash/system/audio/tray_volume.cc index 1551b60..672ddeb 100644 --- a/ash/system/audio/tray_volume.cc +++ b/ash/system/audio/tray_volume.cc @@ -9,6 +9,7 @@ #include "ash/ash_constants.h" #include "ash/shell.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_views.h" #include "ash/volume_control_delegate.h" @@ -217,9 +218,11 @@ TrayVolume::TrayVolume(SystemTray* system_tray) : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_VOLUME_MUTE), volume_view_(NULL), is_default_view_(false) { + Shell::GetInstance()->system_tray_notifier()->AddAudioObserver(this); } TrayVolume::~TrayVolume() { + Shell::GetInstance()->system_tray_notifier()->RemoveAudioObserver(this); } bool TrayVolume::GetInitialVisibility() { |