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 #ifndef ASH_SYSTEM_DATE_DATE_VIEW_H_ | 5 #ifndef ASH_SYSTEM_DATE_DATE_VIEW_H_ |
6 #define ASH_SYSTEM_DATE_DATE_VIEW_H_ | 6 #define ASH_SYSTEM_DATE_DATE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/system/tray/tray_views.h" | 9 #include "ash/system/tray/tray_views.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 void UpdateText(); | 29 void UpdateText(); |
30 | 30 |
31 protected: | 31 protected: |
32 BaseDateTimeView(); | 32 BaseDateTimeView(); |
33 | 33 |
34 private: | 34 private: |
35 // Updates labels to display the current time. | 35 // Updates labels to display the current time. |
36 virtual void UpdateTextInternal(const base::Time& now) = 0; | 36 virtual void UpdateTextInternal(const base::Time& now) = 0; |
37 | 37 |
38 // Overridden from views::View. | 38 // Overridden from views::View. |
| 39 virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE; |
39 virtual void OnLocaleChanged() OVERRIDE; | 40 virtual void OnLocaleChanged() OVERRIDE; |
40 | 41 |
41 base::OneShotTimer<BaseDateTimeView> timer_; | 42 base::OneShotTimer<BaseDateTimeView> timer_; |
42 | 43 |
43 DISALLOW_COPY_AND_ASSIGN(BaseDateTimeView); | 44 DISALLOW_COPY_AND_ASSIGN(BaseDateTimeView); |
44 }; | 45 }; |
45 | 46 |
46 // Popup view used to display the date and day of week. | 47 // Popup view used to display the date and day of week. |
47 class DateView : public BaseDateTimeView { | 48 class DateView : public BaseDateTimeView { |
48 public: | 49 public: |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 base::HourClockType hour_type_; | 93 base::HourClockType hour_type_; |
93 | 94 |
94 DISALLOW_COPY_AND_ASSIGN(TimeView); | 95 DISALLOW_COPY_AND_ASSIGN(TimeView); |
95 }; | 96 }; |
96 | 97 |
97 } // namespace tray | 98 } // namespace tray |
98 } // namespace internal | 99 } // namespace internal |
99 } // namespace ash | 100 } // namespace ash |
100 | 101 |
101 #endif // ASH_SYSTEM_DATE_DATE_VIEW_H_ | 102 #endif // ASH_SYSTEM_DATE_DATE_VIEW_H_ |
OLD | NEW |