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

Side by Side Diff: Source/core/html/shadow/DateTimeFieldElements.h

Issue 131793003: Update remaining HTML classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove useless FINAL Created 6 years, 11 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 24 matching lines...) Expand all
35 class DateTimeAMPMFieldElement FINAL : public DateTimeSymbolicFieldElement { 35 class DateTimeAMPMFieldElement FINAL : public DateTimeSymbolicFieldElement {
36 WTF_MAKE_NONCOPYABLE(DateTimeAMPMFieldElement); 36 WTF_MAKE_NONCOPYABLE(DateTimeAMPMFieldElement);
37 37
38 public: 38 public:
39 static PassRefPtr<DateTimeAMPMFieldElement> create(Document&, FieldOwner&, c onst Vector<String>&); 39 static PassRefPtr<DateTimeAMPMFieldElement> create(Document&, FieldOwner&, c onst Vector<String>&);
40 40
41 private: 41 private:
42 DateTimeAMPMFieldElement(Document&, FieldOwner&, const Vector<String>&); 42 DateTimeAMPMFieldElement(Document&, FieldOwner&, const Vector<String>&);
43 43
44 // DateTimeFieldElement functions. 44 // DateTimeFieldElement functions.
45 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 45 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
46 virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL; 46 virtual void setValueAsDate(const DateComponents&) OVERRIDE;
47 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE FINAL; 47 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE;
48 }; 48 };
49 49
50 class DateTimeDayFieldElement FINAL : public DateTimeNumericFieldElement { 50 class DateTimeDayFieldElement FINAL : public DateTimeNumericFieldElement {
51 WTF_MAKE_NONCOPYABLE(DateTimeDayFieldElement); 51 WTF_MAKE_NONCOPYABLE(DateTimeDayFieldElement);
52 52
53 public: 53 public:
54 static PassRefPtr<DateTimeDayFieldElement> create(Document&, FieldOwner&, co nst String& placeholder, const Range&); 54 static PassRefPtr<DateTimeDayFieldElement> create(Document&, FieldOwner&, co nst String& placeholder, const Range&);
55 55
56 private: 56 private:
57 DateTimeDayFieldElement(Document&, FieldOwner&, const String& placeholder, c onst Range&); 57 DateTimeDayFieldElement(Document&, FieldOwner&, const String& placeholder, c onst Range&);
58 58
59 // DateTimeFieldElement functions. 59 // DateTimeFieldElement functions.
60 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 60 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
61 virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL; 61 virtual void setValueAsDate(const DateComponents&) OVERRIDE;
62 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE FINAL; 62 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE;
63 }; 63 };
64 64
65 class DateTimeHourFieldElementBase : public DateTimeNumericFieldElement { 65 class DateTimeHourFieldElementBase : public DateTimeNumericFieldElement {
66 WTF_MAKE_NONCOPYABLE(DateTimeHourFieldElementBase); 66 WTF_MAKE_NONCOPYABLE(DateTimeHourFieldElementBase);
67 67
68 protected: 68 protected:
69 DateTimeHourFieldElementBase(Document&, FieldOwner&, const Range&, const Ran ge& hardLimits, const Step&); 69 DateTimeHourFieldElementBase(Document&, FieldOwner&, const Range&, const Ran ge& hardLimits, const Step&);
70 void initialize(); 70 void initialize();
71 71
72 private: 72 private:
73 // DateTimeFieldElement functions. 73 // DateTimeFieldElement functions.
74 virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL; 74 virtual void setValueAsDate(const DateComponents&) OVERRIDE;
75 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE FINAL; 75 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE;
76 }; 76 };
77 77
78 class DateTimeHour11FieldElement FINAL : public DateTimeHourFieldElementBase { 78 class DateTimeHour11FieldElement FINAL : public DateTimeHourFieldElementBase {
79 WTF_MAKE_NONCOPYABLE(DateTimeHour11FieldElement); 79 WTF_MAKE_NONCOPYABLE(DateTimeHour11FieldElement);
80 80
81 public: 81 public:
82 static PassRefPtr<DateTimeHour11FieldElement> create(Document&, FieldOwner&, const Range&, const Step&); 82 static PassRefPtr<DateTimeHour11FieldElement> create(Document&, FieldOwner&, const Range&, const Step&);
83 83
84 private: 84 private:
85 DateTimeHour11FieldElement(Document&, FieldOwner&, const Range& hour23Range, const Step&); 85 DateTimeHour11FieldElement(Document&, FieldOwner&, const Range& hour23Range, const Step&);
86 86
87 // DateTimeFieldElement functions. 87 // DateTimeFieldElement functions.
88 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 88 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
89 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) OVERRID E FINAL; 89 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) OVERRID E;
90 }; 90 };
91 91
92 class DateTimeHour12FieldElement FINAL : public DateTimeHourFieldElementBase { 92 class DateTimeHour12FieldElement FINAL : public DateTimeHourFieldElementBase {
93 WTF_MAKE_NONCOPYABLE(DateTimeHour12FieldElement); 93 WTF_MAKE_NONCOPYABLE(DateTimeHour12FieldElement);
94 94
95 public: 95 public:
96 static PassRefPtr<DateTimeHour12FieldElement> create(Document&, FieldOwner&, const Range&, const Step&); 96 static PassRefPtr<DateTimeHour12FieldElement> create(Document&, FieldOwner&, const Range&, const Step&);
97 97
98 private: 98 private:
99 DateTimeHour12FieldElement(Document&, FieldOwner&, const Range& hour23Range, const Step&); 99 DateTimeHour12FieldElement(Document&, FieldOwner&, const Range& hour23Range, const Step&);
100 100
101 // DateTimeFieldElement functions. 101 // DateTimeFieldElement functions.
102 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 102 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
103 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) OVERRID E FINAL; 103 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) OVERRID E;
104 }; 104 };
105 105
106 class DateTimeHour23FieldElement FINAL : public DateTimeHourFieldElementBase { 106 class DateTimeHour23FieldElement FINAL : public DateTimeHourFieldElementBase {
107 WTF_MAKE_NONCOPYABLE(DateTimeHour23FieldElement); 107 WTF_MAKE_NONCOPYABLE(DateTimeHour23FieldElement);
108 108
109 public: 109 public:
110 static PassRefPtr<DateTimeHour23FieldElement> create(Document&, FieldOwner&, const Range&, const Step&); 110 static PassRefPtr<DateTimeHour23FieldElement> create(Document&, FieldOwner&, const Range&, const Step&);
111 111
112 private: 112 private:
113 DateTimeHour23FieldElement(Document&, FieldOwner&, const Range& hour23Range, const Step&); 113 DateTimeHour23FieldElement(Document&, FieldOwner&, const Range& hour23Range, const Step&);
114 114
115 // DateTimeFieldElement functions. 115 // DateTimeFieldElement functions.
116 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 116 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
117 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) OVERRID E FINAL; 117 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) OVERRID E;
118 }; 118 };
119 119
120 class DateTimeHour24FieldElement FINAL : public DateTimeHourFieldElementBase { 120 class DateTimeHour24FieldElement FINAL : public DateTimeHourFieldElementBase {
121 WTF_MAKE_NONCOPYABLE(DateTimeHour24FieldElement); 121 WTF_MAKE_NONCOPYABLE(DateTimeHour24FieldElement);
122 122
123 public: 123 public:
124 static PassRefPtr<DateTimeHour24FieldElement> create(Document&, FieldOwner&, const Range&, const Step&); 124 static PassRefPtr<DateTimeHour24FieldElement> create(Document&, FieldOwner&, const Range&, const Step&);
125 125
126 private: 126 private:
127 DateTimeHour24FieldElement(Document&, FieldOwner&, const Range& hour23Range, const Step&); 127 DateTimeHour24FieldElement(Document&, FieldOwner&, const Range& hour23Range, const Step&);
128 128
129 // DateTimeFieldElement functions. 129 // DateTimeFieldElement functions.
130 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 130 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
131 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) OVERRID E FINAL; 131 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) OVERRID E;
132 }; 132 };
133 133
134 class DateTimeMillisecondFieldElement FINAL : public DateTimeNumericFieldElement { 134 class DateTimeMillisecondFieldElement FINAL : public DateTimeNumericFieldElement {
135 WTF_MAKE_NONCOPYABLE(DateTimeMillisecondFieldElement); 135 WTF_MAKE_NONCOPYABLE(DateTimeMillisecondFieldElement);
136 136
137 public: 137 public:
138 static PassRefPtr<DateTimeMillisecondFieldElement> create(Document&, FieldOw ner&, const Range&, const Step&); 138 static PassRefPtr<DateTimeMillisecondFieldElement> create(Document&, FieldOw ner&, const Range&, const Step&);
139 139
140 private: 140 private:
141 DateTimeMillisecondFieldElement(Document&, FieldOwner&, const Range&, const Step&); 141 DateTimeMillisecondFieldElement(Document&, FieldOwner&, const Range&, const Step&);
142 142
143 // DateTimeFieldElement functions. 143 // DateTimeFieldElement functions.
144 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 144 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
145 virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL; 145 virtual void setValueAsDate(const DateComponents&) OVERRIDE;
146 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE FINAL; 146 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE;
147 }; 147 };
148 148
149 class DateTimeMinuteFieldElement FINAL : public DateTimeNumericFieldElement { 149 class DateTimeMinuteFieldElement FINAL : public DateTimeNumericFieldElement {
150 WTF_MAKE_NONCOPYABLE(DateTimeMinuteFieldElement); 150 WTF_MAKE_NONCOPYABLE(DateTimeMinuteFieldElement);
151 151
152 public: 152 public:
153 static PassRefPtr<DateTimeMinuteFieldElement> create(Document&, FieldOwner&, const Range&, const Step&); 153 static PassRefPtr<DateTimeMinuteFieldElement> create(Document&, FieldOwner&, const Range&, const Step&);
154 154
155 private: 155 private:
156 DateTimeMinuteFieldElement(Document&, FieldOwner&, const Range&, const Step& ); 156 DateTimeMinuteFieldElement(Document&, FieldOwner&, const Range&, const Step& );
157 157
158 // DateTimeFieldElement functions. 158 // DateTimeFieldElement functions.
159 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 159 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
160 virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL; 160 virtual void setValueAsDate(const DateComponents&) OVERRIDE;
161 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE FINAL; 161 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE;
162 }; 162 };
163 163
164 class DateTimeMonthFieldElement FINAL : public DateTimeNumericFieldElement { 164 class DateTimeMonthFieldElement FINAL : public DateTimeNumericFieldElement {
165 WTF_MAKE_NONCOPYABLE(DateTimeMonthFieldElement); 165 WTF_MAKE_NONCOPYABLE(DateTimeMonthFieldElement);
166 166
167 public: 167 public:
168 static PassRefPtr<DateTimeMonthFieldElement> create(Document&, FieldOwner&, const String& placeholder, const Range&); 168 static PassRefPtr<DateTimeMonthFieldElement> create(Document&, FieldOwner&, const String& placeholder, const Range&);
169 169
170 private: 170 private:
171 DateTimeMonthFieldElement(Document&, FieldOwner&, const String& placeholder, const Range&); 171 DateTimeMonthFieldElement(Document&, FieldOwner&, const String& placeholder, const Range&);
172 172
173 // DateTimeFieldElement functions. 173 // DateTimeFieldElement functions.
174 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 174 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
175 virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL; 175 virtual void setValueAsDate(const DateComponents&) OVERRIDE;
176 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE FINAL; 176 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE;
177 }; 177 };
178 178
179 class DateTimeSecondFieldElement FINAL : public DateTimeNumericFieldElement { 179 class DateTimeSecondFieldElement FINAL : public DateTimeNumericFieldElement {
180 WTF_MAKE_NONCOPYABLE(DateTimeSecondFieldElement); 180 WTF_MAKE_NONCOPYABLE(DateTimeSecondFieldElement);
181 181
182 public: 182 public:
183 static PassRefPtr<DateTimeSecondFieldElement> create(Document&, FieldOwner&, const Range&, const Step&); 183 static PassRefPtr<DateTimeSecondFieldElement> create(Document&, FieldOwner&, const Range&, const Step&);
184 184
185 private: 185 private:
186 DateTimeSecondFieldElement(Document&, FieldOwner&, const Range&, const Step& ); 186 DateTimeSecondFieldElement(Document&, FieldOwner&, const Range&, const Step& );
187 187
188 // DateTimeFieldElement functions. 188 // DateTimeFieldElement functions.
189 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 189 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
190 virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL; 190 virtual void setValueAsDate(const DateComponents&) OVERRIDE;
191 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE FINAL; 191 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE;
192 }; 192 };
193 193
194 class DateTimeSymbolicMonthFieldElement FINAL : public DateTimeSymbolicFieldElem ent { 194 class DateTimeSymbolicMonthFieldElement FINAL : public DateTimeSymbolicFieldElem ent {
195 WTF_MAKE_NONCOPYABLE(DateTimeSymbolicMonthFieldElement); 195 WTF_MAKE_NONCOPYABLE(DateTimeSymbolicMonthFieldElement);
196 196
197 public: 197 public:
198 static PassRefPtr<DateTimeSymbolicMonthFieldElement> create(Document&, Field Owner&, const Vector<String>&, int minimum, int maximum); 198 static PassRefPtr<DateTimeSymbolicMonthFieldElement> create(Document&, Field Owner&, const Vector<String>&, int minimum, int maximum);
199 199
200 private: 200 private:
201 DateTimeSymbolicMonthFieldElement(Document&, FieldOwner&, const Vector<Strin g>&, int minimum, int maximum); 201 DateTimeSymbolicMonthFieldElement(Document&, FieldOwner&, const Vector<Strin g>&, int minimum, int maximum);
202 202
203 // DateTimeFieldElement functions. 203 // DateTimeFieldElement functions.
204 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 204 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
205 virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL; 205 virtual void setValueAsDate(const DateComponents&) OVERRIDE;
206 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE FINAL; 206 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE;
207 }; 207 };
208 208
209 class DateTimeWeekFieldElement FINAL : public DateTimeNumericFieldElement { 209 class DateTimeWeekFieldElement FINAL : public DateTimeNumericFieldElement {
210 WTF_MAKE_NONCOPYABLE(DateTimeWeekFieldElement); 210 WTF_MAKE_NONCOPYABLE(DateTimeWeekFieldElement);
211 211
212 public: 212 public:
213 static PassRefPtr<DateTimeWeekFieldElement> create(Document&, FieldOwner&, c onst Range&); 213 static PassRefPtr<DateTimeWeekFieldElement> create(Document&, FieldOwner&, c onst Range&);
214 214
215 private: 215 private:
216 DateTimeWeekFieldElement(Document&, FieldOwner&, const Range&); 216 DateTimeWeekFieldElement(Document&, FieldOwner&, const Range&);
217 217
218 // DateTimeFieldElement functions. 218 // DateTimeFieldElement functions.
219 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 219 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
220 virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL; 220 virtual void setValueAsDate(const DateComponents&) OVERRIDE;
221 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE FINAL; 221 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE;
222 }; 222 };
223 223
224 class DateTimeYearFieldElement FINAL : public DateTimeNumericFieldElement { 224 class DateTimeYearFieldElement FINAL : public DateTimeNumericFieldElement {
225 WTF_MAKE_NONCOPYABLE(DateTimeYearFieldElement); 225 WTF_MAKE_NONCOPYABLE(DateTimeYearFieldElement);
226 226
227 public: 227 public:
228 struct Parameters { 228 struct Parameters {
229 int minimumYear; 229 int minimumYear;
230 int maximumYear; 230 int maximumYear;
231 bool minIsSpecified; 231 bool minIsSpecified;
232 bool maxIsSpecified; 232 bool maxIsSpecified;
233 String placeholder; 233 String placeholder;
234 234
235 Parameters() 235 Parameters()
236 : minimumYear(-1) 236 : minimumYear(-1)
237 , maximumYear(-1) 237 , maximumYear(-1)
238 , minIsSpecified(false) 238 , minIsSpecified(false)
239 , maxIsSpecified(false) 239 , maxIsSpecified(false)
240 { 240 {
241 } 241 }
242 }; 242 };
243 243
244 static PassRefPtr<DateTimeYearFieldElement> create(Document&, FieldOwner&, c onst Parameters&); 244 static PassRefPtr<DateTimeYearFieldElement> create(Document&, FieldOwner&, c onst Parameters&);
245 245
246 private: 246 private:
247 DateTimeYearFieldElement(Document&, FieldOwner&, const Parameters&); 247 DateTimeYearFieldElement(Document&, FieldOwner&, const Parameters&);
248 248
249 // DateTimeFieldElement functions. 249 // DateTimeFieldElement functions.
250 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINA L; 250 virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE;
251 virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL; 251 virtual void setValueAsDate(const DateComponents&) OVERRIDE;
252 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE FINAL; 252 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) OVERR IDE;
253 253
254 // DateTimeNumericFieldElement functions. 254 // DateTimeNumericFieldElement functions.
255 virtual int defaultValueForStepDown() const OVERRIDE FINAL; 255 virtual int defaultValueForStepDown() const OVERRIDE;
256 virtual int defaultValueForStepUp() const OVERRIDE FINAL; 256 virtual int defaultValueForStepUp() const OVERRIDE;
257 257
258 bool m_minIsSpecified; 258 bool m_minIsSpecified;
259 bool m_maxIsSpecified; 259 bool m_maxIsSpecified;
260 }; 260 };
261 261
262 } // namespace WebCore 262 } // namespace WebCore
263 263
264 #endif 264 #endif
265 #endif 265 #endif
OLDNEW
« no previous file with comments | « Source/core/html/shadow/DateTimeFieldElement.h ('k') | Source/core/html/shadow/DetailsMarkerControl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698