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

Unified Diff: ash/system/status_area_widget.cc

Issue 10854175: Revert 151752 - Move non SystemTray specific code to TrayBackgroundView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months 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 | « no previous file | 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
===================================================================
--- ash/system/status_area_widget.cc (revision 151762)
+++ ash/system/status_area_widget.cc (working copy)
@@ -324,12 +324,9 @@
void StatusAreaWidget::CreateTrayViews(ShellDelegate* shell_delegate) {
AddWebNotificationTray();
AddSystemTray(shell_delegate);
- // Initialize() must be called after all trays have been created.
- if (system_tray_)
- system_tray_->Initialize();
- if (web_notification_tray_)
- web_notification_tray_->Initialize();
- UpdateAfterLoginStatusChange(system_tray_delegate_->GetUserLoginStatus());
+ // SetBorder() must be called after all trays have been created.
+ web_notification_tray_->SetBorder();
+ system_tray_->SetBorder();
}
void StatusAreaWidget::Shutdown() {
@@ -346,6 +343,7 @@
void StatusAreaWidget::AddSystemTray(ShellDelegate* shell_delegate) {
system_tray_ = new SystemTray(this);
status_area_widget_delegate_->AddTray(system_tray_);
+ system_tray_->Initialize(); // Called after added to widget.
if (shell_delegate) {
system_tray_delegate_.reset(
@@ -353,6 +351,9 @@
}
if (!system_tray_delegate_.get())
system_tray_delegate_.reset(new DummySystemTrayDelegate());
+
+ system_tray_->CreateItems(); // Called after delegate is created.
+ UpdateAfterLoginStatusChange(system_tray_delegate_->GetUserLoginStatus());
}
void StatusAreaWidget::AddWebNotificationTray() {
« no previous file with comments | « no previous file | ash/system/tray/system_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698