summaryrefslogtreecommitdiffstats
path: root/ash/system/status_area_widget.cc
diff options
context:
space:
mode:
authorstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 01:11:00 +0000
committerstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 01:11:00 +0000
commit83b2b84c1e4bc8434630f58e88bcf1a93b33ded6 (patch)
treee6612ff5286a73ed99df758ee600f331396e51d6 /ash/system/status_area_widget.cc
parentd8f1004bcf08a2c0d629198a3695808b3a400487 (diff)
downloadchromium_src-83b2b84c1e4bc8434630f58e88bcf1a93b33ded6.zip
chromium_src-83b2b84c1e4bc8434630f58e88bcf1a93b33ded6.tar.gz
chromium_src-83b2b84c1e4bc8434630f58e88bcf1a93b33ded6.tar.bz2
Add SystemTrayObservers
Once there is more than one SystemTray instance, we will need to support observer lists so that multiple tray items can be notified. Hosting the observer lists in a separate class owned by ass::SystemTrayDelegate seemed like the most forward approach. BUG=159543 For ash.gyp: TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/11312139 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/status_area_widget.cc')
-rw-r--r--ash/system/status_area_widget.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
index b487de5..c1b165f 100644
--- a/ash/system/status_area_widget.cc
+++ b/ash/system/status_area_widget.cc
@@ -46,13 +46,14 @@ StatusAreaWidget::~StatusAreaWidget() {
void StatusAreaWidget::CreateTrayViews() {
AddSystemTray();
AddWebNotificationTray();
- // Initialize() must be called after all trays have been created.
+ SystemTrayDelegate* delegate = ash::Shell::GetInstance()->tray_delegate();
+ DCHECK(delegate);
+ // Initialize after all trays have been created.
if (system_tray_)
- system_tray_->Initialize();
+ system_tray_->InitializeTrayItems(delegate);
if (web_notification_tray_)
web_notification_tray_->Initialize();
- UpdateAfterLoginStatusChange(
- ash::Shell::GetInstance()->tray_delegate()->GetUserLoginStatus());
+ UpdateAfterLoginStatusChange(delegate->GetUserLoginStatus());
}
void StatusAreaWidget::Shutdown() {