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

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

Issue 621133002: replace OVERRIDE and FINAL with override and final in ash/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « ash/system/date/date_default_view.h ('k') | ash/system/date/tray_date.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22 matching lines...) Expand all
33 BaseDateTimeView(); 33 BaseDateTimeView();
34 34
35 private: 35 private:
36 // Starts |timer_| to schedule the next update. 36 // Starts |timer_| to schedule the next update.
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 virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE; 43 virtual void ChildPreferredSizeChanged(views::View* child) override;
44 virtual void OnLocaleChanged() OVERRIDE; 44 virtual 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<BaseDateTimeView> 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 virtual ~DateView(); 56 virtual ~DateView();
57 57
58 // Sets the action the view should take. An actionable date view gives visual 58 // Sets the action the view should take. An actionable date view gives visual
59 // feedback on hover, can be focused by keyboard, and clicking/pressing space 59 // feedback on hover, can be focused by keyboard, and clicking/pressing space
60 // or enter on the view executes the action. 60 // or enter on the view executes the action.
61 void SetAction(TrayDate::DateAction action); 61 void SetAction(TrayDate::DateAction action);
62 62
63 // Updates the format of the displayed time. 63 // Updates the format of the displayed time.
64 void UpdateTimeFormat(); 64 void UpdateTimeFormat();
65 65
66 base::HourClockType GetHourTypeForTesting() const; 66 base::HourClockType GetHourTypeForTesting() const;
67 67
68 private: 68 private:
69 // Overridden from BaseDateTimeView. 69 // Overridden from BaseDateTimeView.
70 virtual void UpdateTextInternal(const base::Time& now) OVERRIDE; 70 virtual void UpdateTextInternal(const base::Time& now) override;
71 71
72 // Overridden from ActionableView. 72 // Overridden from ActionableView.
73 virtual bool PerformAction(const ui::Event& event) OVERRIDE; 73 virtual bool PerformAction(const ui::Event& event) override;
74 74
75 // Overridden from views::View. 75 // Overridden from views::View.
76 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; 76 virtual void OnMouseEntered(const ui::MouseEvent& event) override;
77 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 77 virtual void OnMouseExited(const ui::MouseEvent& event) override;
78 78
79 views::Label* date_label_; 79 views::Label* date_label_;
80 80
81 // Time format (12/24hr) used for accessibility string. 81 // Time format (12/24hr) used for accessibility string.
82 base::HourClockType hour_type_; 82 base::HourClockType hour_type_;
83 83
84 TrayDate::DateAction action_; 84 TrayDate::DateAction action_;
85 85
86 DISALLOW_COPY_AND_ASSIGN(DateView); 86 DISALLOW_COPY_AND_ASSIGN(DateView);
87 }; 87 };
(...skipping 10 matching lines...) Expand all
98 98
99 // Updates clock layout. 99 // Updates clock layout.
100 void UpdateClockLayout(TrayDate::ClockLayout clock_layout); 100 void UpdateClockLayout(TrayDate::ClockLayout clock_layout);
101 101
102 base::HourClockType GetHourTypeForTesting() const; 102 base::HourClockType GetHourTypeForTesting() const;
103 103
104 private: 104 private:
105 friend class TimeViewTest; 105 friend class TimeViewTest;
106 106
107 // Overridden from BaseDateTimeView. 107 // Overridden from BaseDateTimeView.
108 virtual void UpdateTextInternal(const base::Time& now) OVERRIDE; 108 virtual void UpdateTextInternal(const base::Time& now) override;
109 109
110 // Overridden from ActionableView. 110 // Overridden from ActionableView.
111 virtual bool PerformAction(const ui::Event& event) OVERRIDE; 111 virtual bool PerformAction(const ui::Event& event) override;
112 112
113 // Overridden from views::View. 113 // Overridden from views::View.
114 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; 114 virtual bool OnMousePressed(const ui::MouseEvent& event) override;
115 115
116 void SetBorderFromLayout(TrayDate::ClockLayout clock_layout); 116 void SetBorderFromLayout(TrayDate::ClockLayout clock_layout);
117 void SetupLabels(); 117 void SetupLabels();
118 void SetupLabel(views::Label* label); 118 void SetupLabel(views::Label* label);
119 119
120 // Label text used for the normal horizontal shelf. 120 // Label text used for the normal horizontal shelf.
121 scoped_ptr<views::Label> horizontal_label_; 121 scoped_ptr<views::Label> horizontal_label_;
122 122
123 // The time label is split into two lines for the vertical shelf. 123 // The time label is split into two lines for the vertical shelf.
124 scoped_ptr<views::Label> vertical_label_hours_; 124 scoped_ptr<views::Label> vertical_label_hours_;
125 scoped_ptr<views::Label> vertical_label_minutes_; 125 scoped_ptr<views::Label> vertical_label_minutes_;
126 126
127 base::HourClockType hour_type_; 127 base::HourClockType hour_type_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(TimeView); 129 DISALLOW_COPY_AND_ASSIGN(TimeView);
130 }; 130 };
131 131
132 } // namespace tray 132 } // namespace tray
133 } // namespace ash 133 } // namespace ash
134 134
135 #endif // ASH_SYSTEM_DATE_DATE_VIEW_H_ 135 #endif // ASH_SYSTEM_DATE_DATE_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/date/date_default_view.h ('k') | ash/system/date/tray_date.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698