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/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/date/date_view.h" | 8 #include "ash/system/date/date_view.h" |
9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
11 #include "ash/system/tray/system_tray_notifier.h" | 11 #include "ash/system/tray/system_tray_notifier.h" |
12 #include "ash/system/tray/tray_constants.h" | 12 #include "ash/system/tray/tray_constants.h" |
13 #include "ash/system/tray/tray_item_view.h" | 13 #include "ash/system/tray/tray_item_view.h" |
14 #include "ash/system/tray/tray_views.h" | 14 #include "ash/system/tray/tray_views.h" |
15 #include "base/i18n/time_formatting.h" | 15 #include "base/i18n/time_formatting.h" |
16 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
17 #include "base/time.h" | 17 #include "base/time.h" |
18 #include "base/timer.h" | 18 #include "base/timer.h" |
19 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
20 #include "grit/ash_resources.h" | 20 #include "grit/ash_resources.h" |
21 #include "grit/ash_strings.h" | 21 #include "grit/ash_strings.h" |
| 22 #include "third_party/icu/public/i18n/unicode/datefmt.h" |
| 23 #include "third_party/icu/public/i18n/unicode/fieldpos.h" |
| 24 #include "third_party/icu/public/i18n/unicode/fmtable.h" |
22 #include "third_party/skia/include/core/SkRect.h" | 25 #include "third_party/skia/include/core/SkRect.h" |
23 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
24 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
25 #include "ui/gfx/image/image.h" | 28 #include "ui/gfx/image/image.h" |
26 #include "ui/gfx/image/image_skia.h" | 29 #include "ui/gfx/image/image_skia.h" |
27 #include "ui/gfx/size.h" | 30 #include "ui/gfx/size.h" |
28 #include "ui/views/controls/button/button.h" | 31 #include "ui/views/controls/button/button.h" |
29 #include "ui/views/controls/button/text_button.h" | 32 #include "ui/views/controls/button/text_button.h" |
30 #include "ui/views/controls/image_view.h" | 33 #include "ui/views/controls/image_view.h" |
31 #include "ui/views/controls/label.h" | 34 #include "ui/views/controls/label.h" |
32 #include "ui/views/layout/box_layout.h" | 35 #include "ui/views/layout/box_layout.h" |
33 #include "ui/views/layout/fill_layout.h" | 36 #include "ui/views/layout/fill_layout.h" |
34 #include "ui/views/painter.h" | 37 #include "ui/views/painter.h" |
35 #include "ui/views/view.h" | 38 #include "ui/views/view.h" |
36 #include "ui/views/widget/widget.h" | 39 #include "ui/views/widget/widget.h" |
37 #include "unicode/datefmt.h" | |
38 #include "unicode/fieldpos.h" | |
39 #include "unicode/fmtable.h" | |
40 | 40 |
41 namespace { | 41 namespace { |
42 | 42 |
43 const int kPaddingVertical = 19; | 43 const int kPaddingVertical = 19; |
44 | 44 |
45 class DateDefaultView : public views::View, | 45 class DateDefaultView : public views::View, |
46 public views::ButtonListener { | 46 public views::ButtonListener { |
47 public: | 47 public: |
48 explicit DateDefaultView(ash::user::LoginStatus login) | 48 explicit DateDefaultView(ash::user::LoginStatus login) |
49 : help_(NULL), | 49 : help_(NULL), |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 time_tray_->UpdateTimeFormat(); | 187 time_tray_->UpdateTimeFormat(); |
188 } | 188 } |
189 | 189 |
190 void TrayDate::Refresh() { | 190 void TrayDate::Refresh() { |
191 if (time_tray_) | 191 if (time_tray_) |
192 time_tray_->UpdateText(); | 192 time_tray_->UpdateText(); |
193 } | 193 } |
194 | 194 |
195 } // namespace internal | 195 } // namespace internal |
196 } // namespace ash | 196 } // namespace ash |
OLD | NEW |