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/date_view.h" | 5 #include "ash/system/date/date_view.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 icu::UnicodeString date_string; | 56 icu::UnicodeString date_string; |
57 simple_formatter.format( | 57 simple_formatter.format( |
58 static_cast<UDate>(time.ToDoubleT() * 1000), date_string, status); | 58 static_cast<UDate>(time.ToDoubleT() * 1000), date_string, status); |
59 DCHECK(U_SUCCESS(status)); | 59 DCHECK(U_SUCCESS(status)); |
60 return string16( | 60 return string16( |
61 date_string.getBuffer(), static_cast<size_t>(date_string.length())); | 61 date_string.getBuffer(), static_cast<size_t>(date_string.length())); |
62 } | 62 } |
63 | 63 |
64 views::Label* CreateLabel() { | 64 views::Label* CreateLabel() { |
65 views::Label* label = new views::Label; | 65 views::Label* label = new views::Label; |
66 label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 66 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
67 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); | 67 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); |
68 return label; | 68 return label; |
69 } | 69 } |
70 | 70 |
71 } // namespace | 71 } // namespace |
72 | 72 |
73 BaseDateTimeView::~BaseDateTimeView() { | 73 BaseDateTimeView::~BaseDateTimeView() { |
74 timer_.Stop(); | 74 timer_.Stop(); |
75 } | 75 } |
76 | 76 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 void TimeView::SetupLabel(views::Label* label) { | 275 void TimeView::SetupLabel(views::Label* label) { |
276 label->set_owned_by_client(); | 276 label->set_owned_by_client(); |
277 SetupLabelForTray(label); | 277 SetupLabelForTray(label); |
278 gfx::Font font = label->font(); | 278 gfx::Font font = label->font(); |
279 label->SetFont(font.DeriveFont(0, font.GetStyle() & ~gfx::Font::BOLD)); | 279 label->SetFont(font.DeriveFont(0, font.GetStyle() & ~gfx::Font::BOLD)); |
280 } | 280 } |
281 | 281 |
282 } // namespace tray | 282 } // namespace tray |
283 } // namespace internal | 283 } // namespace internal |
284 } // namespace ash | 284 } // namespace ash |
OLD | NEW |