| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/system/date/tray_date.h" | 5 #include "ash/system/date/tray_date.h" |
| 6 | 6 |
| 7 #include "ash/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
| 8 #include "ash/session_state_delegate.h" | 8 #include "ash/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 public views::ButtonListener { | 57 public views::ButtonListener { |
| 58 public: | 58 public: |
| 59 explicit DateDefaultView(ash::user::LoginStatus login) | 59 explicit DateDefaultView(ash::user::LoginStatus login) |
| 60 : help_(NULL), | 60 : help_(NULL), |
| 61 shutdown_(NULL), | 61 shutdown_(NULL), |
| 62 lock_(NULL), | 62 lock_(NULL), |
| 63 date_view_(NULL) { | 63 date_view_(NULL) { |
| 64 SetLayoutManager(new views::FillLayout); | 64 SetLayoutManager(new views::FillLayout); |
| 65 | 65 |
| 66 date_view_ = new tray::DateView(); | 66 date_view_ = new tray::DateView(); |
| 67 date_view_->set_border(views::Border::CreateEmptyBorder(kPaddingVertical, | 67 date_view_->SetBorder(views::Border::CreateEmptyBorder( |
| 68 ash::kTrayPopupPaddingHorizontal, | 68 kPaddingVertical, ash::kTrayPopupPaddingHorizontal, 0, 0)); |
| 69 0, | |
| 70 0)); | |
| 71 SpecialPopupRow* view = new SpecialPopupRow(); | 69 SpecialPopupRow* view = new SpecialPopupRow(); |
| 72 view->SetContent(date_view_); | 70 view->SetContent(date_view_); |
| 73 AddChildView(view); | 71 AddChildView(view); |
| 74 | 72 |
| 75 if (login == ash::user::LOGGED_IN_LOCKED || | 73 if (login == ash::user::LOGGED_IN_LOCKED || |
| 76 login == ash::user::LOGGED_IN_NONE) | 74 login == ash::user::LOGGED_IN_NONE) |
| 77 return; | 75 return; |
| 78 | 76 |
| 79 date_view_->SetActionable(true); | 77 date_view_->SetActionable(true); |
| 80 | 78 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 default_view_->GetDateView()->UpdateTimeFormat(); | 229 default_view_->GetDateView()->UpdateTimeFormat(); |
| 232 } | 230 } |
| 233 | 231 |
| 234 void TrayDate::Refresh() { | 232 void TrayDate::Refresh() { |
| 235 if (time_tray_) | 233 if (time_tray_) |
| 236 time_tray_->UpdateText(); | 234 time_tray_->UpdateText(); |
| 237 } | 235 } |
| 238 | 236 |
| 239 } // namespace internal | 237 } // namespace internal |
| 240 } // namespace ash | 238 } // namespace ash |
| OLD | NEW |