| 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/shelf/shelf_util.h" |
| 7 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 8 #include "ash/system/date/date_default_view.h" | 9 #include "ash/system/date/date_default_view.h" |
| 9 #include "ash/system/date/date_view.h" | 10 #include "ash/system/date/date_view.h" |
| 10 #include "ash/system/tray/system_tray.h" | 11 #include "ash/system/tray/system_tray.h" |
| 11 #include "ash/system/tray/system_tray_notifier.h" | 12 #include "ash/system/tray/system_tray_notifier.h" |
| 12 #include "ash/system/tray/tray_item_view.h" | 13 #include "ash/system/tray/tray_item_view.h" |
| 13 | 14 |
| 14 #if defined(OS_CHROMEOS) | 15 #if defined(OS_CHROMEOS) |
| 15 #include "ash/system/chromeos/system_clock_observer.h" | 16 #include "ash/system/chromeos/system_clock_observer.h" |
| 16 #endif | 17 #endif |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 89 |
| 89 void TrayDate::DestroyDetailedView() { | 90 void TrayDate::DestroyDetailedView() { |
| 90 } | 91 } |
| 91 | 92 |
| 92 void TrayDate::UpdateAfterLoginStatusChange(user::LoginStatus status) { | 93 void TrayDate::UpdateAfterLoginStatusChange(user::LoginStatus status) { |
| 93 } | 94 } |
| 94 | 95 |
| 95 void TrayDate::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { | 96 void TrayDate::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { |
| 96 if (time_tray_) { | 97 if (time_tray_) { |
| 97 ClockLayout clock_layout = | 98 ClockLayout clock_layout = |
| 98 alignment == SHELF_ALIGNMENT_BOTTOM ? HORIZONTAL_CLOCK : VERTICAL_CLOCK; | 99 IsHorizontalAlignment(alignment) ? HORIZONTAL_CLOCK : VERTICAL_CLOCK; |
| 99 time_tray_->UpdateClockLayout(clock_layout); | 100 time_tray_->UpdateClockLayout(clock_layout); |
| 100 } | 101 } |
| 101 } | 102 } |
| 102 | 103 |
| 103 void TrayDate::OnDateFormatChanged() { | 104 void TrayDate::OnDateFormatChanged() { |
| 104 if (time_tray_) | 105 if (time_tray_) |
| 105 time_tray_->UpdateTimeFormat(); | 106 time_tray_->UpdateTimeFormat(); |
| 106 if (default_view_) | 107 if (default_view_) |
| 107 default_view_->GetDateView()->UpdateTimeFormat(); | 108 default_view_->GetDateView()->UpdateTimeFormat(); |
| 108 } | 109 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 122 can_set_time ? TrayDate::SET_SYSTEM_TIME : TrayDate::NONE); | 123 can_set_time ? TrayDate::SET_SYSTEM_TIME : TrayDate::NONE); |
| 123 } | 124 } |
| 124 } | 125 } |
| 125 | 126 |
| 126 void TrayDate::Refresh() { | 127 void TrayDate::Refresh() { |
| 127 if (time_tray_) | 128 if (time_tray_) |
| 128 time_tray_->UpdateText(); | 129 time_tray_->UpdateText(); |
| 129 } | 130 } |
| 130 | 131 |
| 131 } // namespace ash | 132 } // namespace ash |
| OLD | NEW |