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

Unified Diff: ash/system/status_area_widget.cc

Issue 10834338: Move non SystemTray specific code to TrayBackgroundView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test 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
diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
index 32f48719b7e966a614a74f108e7f776842726d0d..c63e44a663a292baf090dad8f3e14e79fe2abf44 100644
--- a/ash/system/status_area_widget.cc
+++ b/ash/system/status_area_widget.cc
@@ -324,9 +324,12 @@ StatusAreaWidget::~StatusAreaWidget() {
void StatusAreaWidget::CreateTrayViews(ShellDelegate* shell_delegate) {
AddWebNotificationTray();
AddSystemTray(shell_delegate);
- // SetBorder() must be called after all trays have been created.
- web_notification_tray_->SetBorder();
- system_tray_->SetBorder();
+ // 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());
}
void StatusAreaWidget::Shutdown() {
@@ -343,7 +346,6 @@ void StatusAreaWidget::Shutdown() {
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(
@@ -351,9 +353,6 @@ void StatusAreaWidget::AddSystemTray(ShellDelegate* shell_delegate) {
}
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