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

Unified Diff: ash/system/date/tray_date.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/date/tray_date.h ('k') | ash/system/drive/tray_drive.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/date/tray_date.cc
diff --git a/ash/system/date/tray_date.cc b/ash/system/date/tray_date.cc
index 2b5b2661d44d99598dd07d26ed9c9d88cd3f6f42..47945994f830016c5e84b6cc1b3147d306d733ed 100644
--- a/ash/system/date/tray_date.cc
+++ b/ash/system/date/tray_date.cc
@@ -124,8 +124,9 @@ class DateDefaultView : public views::View,
namespace ash {
namespace internal {
-TrayDate::TrayDate()
- : time_tray_(NULL) {
+TrayDate::TrayDate(SystemTray* system_tray)
+ : SystemTrayItem(system_tray),
+ time_tray_(NULL) {
}
TrayDate::~TrayDate() {
@@ -134,11 +135,10 @@ TrayDate::~TrayDate() {
views::View* TrayDate::CreateTrayView(user::LoginStatus status) {
CHECK(time_tray_ == NULL);
ClockLayout clock_layout =
- ash::Shell::GetInstance()->system_tray()->shelf_alignment() ==
- SHELF_ALIGNMENT_BOTTOM ?
- HORIZONTAL_CLOCK : VERTICAL_CLOCK;
+ system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ?
+ HORIZONTAL_CLOCK : VERTICAL_CLOCK;
time_tray_ = new tray::TimeView(clock_layout);
- views::View* view = new TrayItemView;
+ views::View* view = new TrayItemView(this);
view->AddChildView(time_tray_);
return view;
}
« no previous file with comments | « ash/system/date/tray_date.h ('k') | ash/system/drive/tray_drive.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698