Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1807)

Unified Diff: ash/system/status_area_widget.cc

Issue 11312139: Add SystemTrayObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.cc ('k') | ash/system/tray/system_tray.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/status_area_widget.cc
diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
index b487de50350d378e9737f2f4da853a6cb1e5c7b3..c1b165f6f4d75c532aeb4b8fb6a2dd558591efe6 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() {
« no previous file with comments | « ash/shell.cc ('k') | ash/system/tray/system_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698