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

Unified Diff: ash/system/monitor/tray_monitor.cc

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix single-letter typo :(. 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/system/monitor/tray_monitor.h ('k') | ash/system/power/tray_power.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/monitor/tray_monitor.cc
diff --git a/ash/system/monitor/tray_monitor.cc b/ash/system/monitor/tray_monitor.cc
index 4e4336d61591dcc825ad61080d6bd3ce44aa7fac..0d65a46f533279b3907200da1ce26d8857940716 100644
--- a/ash/system/monitor/tray_monitor.cc
+++ b/ash/system/monitor/tray_monitor.cc
@@ -20,7 +20,9 @@ const int kRefreshTimeoutMs = 1000;
namespace ash {
namespace internal {
-TrayMonitor::TrayMonitor() : label_(NULL) {
+TrayMonitor::TrayMonitor(SystemTray* system_tray)
+ : SystemTrayItem(system_tray),
+ label_(NULL) {
refresh_timer_.Start(FROM_HERE,
base::TimeDelta::FromMilliseconds(kRefreshTimeoutMs),
this, &TrayMonitor::RefreshStats);
@@ -31,7 +33,7 @@ TrayMonitor::~TrayMonitor() {
}
views::View* TrayMonitor::CreateTrayView(user::LoginStatus status) {
- TrayItemView* view = new TrayItemView;
+ TrayItemView* view = new TrayItemView(this);
view->CreateLabel();
label_ = view->label();
SetupLabelForTray(label_);
« no previous file with comments | « ash/system/monitor/tray_monitor.h ('k') | ash/system/power/tray_power.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698