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

Unified Diff: ash/system/tray/system_tray.cc

Issue 10200006: ash: Refresh the tray items, instead of recreating them, when login status changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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 | « ash/system/settings/tray_settings.cc ('k') | ash/system/tray/system_tray_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 5870e5500c0d8610897fd92661fbd4bd1c3d3ad5..1a98a7c239b6bde1d11a0819db472eadd39c242a 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -498,17 +498,9 @@ void SystemTray::UpdateAfterLoginStatusChange(user::LoginStatus login_status) {
for (std::vector<SystemTrayItem*>::iterator it = items_.begin();
it != items_.end();
++it) {
- (*it)->DestroyTrayView();
+ (*it)->UpdateAfterLoginStatusChange(login_status);
}
- container_->RemoveAllChildViews(true);
- for (std::vector<SystemTrayItem*>::iterator it = items_.begin();
- it != items_.end();
- ++it) {
- views::View* view = (*it)->CreateTrayView(login_status);
- if (view)
- container_->AddChildViewAt(view, 0);
- }
SetVisible(true);
PreferredSizeChanged();
}
« no previous file with comments | « ash/system/settings/tray_settings.cc ('k') | ash/system/tray/system_tray_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698