Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: ash/system/date/date_view.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/system/date/tray_date.h" 9 #include "ash/system/date/tray_date.h"
10 #include "ash/system/tray/actionable_view.h" 10 #include "ash/system/tray/actionable_view.h"
(...skipping 26 matching lines...) Expand all
37 void SetTimer(const base::Time& now); 37 void SetTimer(const base::Time& now);
38 38
39 // Updates labels to display the current time. 39 // Updates labels to display the current time.
40 virtual void UpdateTextInternal(const base::Time& now) = 0; 40 virtual void UpdateTextInternal(const base::Time& now) = 0;
41 41
42 // Overridden from views::View. 42 // Overridden from views::View.
43 void ChildPreferredSizeChanged(views::View* child) override; 43 void ChildPreferredSizeChanged(views::View* child) override;
44 void OnLocaleChanged() override; 44 void OnLocaleChanged() override;
45 45
46 // Invokes UpdateText() when the displayed time should change. 46 // Invokes UpdateText() when the displayed time should change.
47 base::OneShotTimer<BaseDateTimeView> timer_; 47 base::OneShotTimer timer_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(BaseDateTimeView); 49 DISALLOW_COPY_AND_ASSIGN(BaseDateTimeView);
50 }; 50 };
51 51
52 // Popup view used to display the date and day of week. 52 // Popup view used to display the date and day of week.
53 class ASH_EXPORT DateView : public BaseDateTimeView { 53 class ASH_EXPORT DateView : public BaseDateTimeView {
54 public: 54 public:
55 DateView(); 55 DateView();
56 ~DateView() override; 56 ~DateView() override;
57 57
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 base::HourClockType hour_type_; 131 base::HourClockType hour_type_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(TimeView); 133 DISALLOW_COPY_AND_ASSIGN(TimeView);
134 }; 134 };
135 135
136 } // namespace tray 136 } // namespace tray
137 } // namespace ash 137 } // namespace ash
138 138
139 #endif // ASH_SYSTEM_DATE_DATE_VIEW_H_ 139 #endif // ASH_SYSTEM_DATE_DATE_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/chromeos/session/tray_session_length_limit.cc ('k') | ash/system/tray/system_tray_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698