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

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

Issue 1219013005: Fix virtual/override/final usage in Source/core/html/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 30 matching lines...) Expand all
41 static PassRefPtrWillBeRawPtr<MediaControlPanelElement> create(MediaControls &); 41 static PassRefPtrWillBeRawPtr<MediaControlPanelElement> create(MediaControls &);
42 42
43 void setIsDisplayed(bool); 43 void setIsDisplayed(bool);
44 44
45 void makeOpaque(); 45 void makeOpaque();
46 void makeTransparent(); 46 void makeTransparent();
47 47
48 private: 48 private:
49 explicit MediaControlPanelElement(MediaControls&); 49 explicit MediaControlPanelElement(MediaControls&);
50 50
51 virtual void defaultEventHandler(Event*) override; 51 void defaultEventHandler(Event*) override;
52 virtual bool keepEventInNode(Event*) override; 52 bool keepEventInNode(Event*) override;
53 53
54 void startTimer(); 54 void startTimer();
55 void stopTimer(); 55 void stopTimer();
56 void transitionTimerFired(Timer<MediaControlPanelElement>*); 56 void transitionTimerFired(Timer<MediaControlPanelElement>*);
57 void didBecomeVisible(); 57 void didBecomeVisible();
58 58
59 bool m_isDisplayed; 59 bool m_isDisplayed;
60 bool m_opaque; 60 bool m_opaque;
61 61
62 Timer<MediaControlPanelElement> m_transitionTimer; 62 Timer<MediaControlPanelElement> m_transitionTimer;
(...skipping 10 matching lines...) Expand all
73 }; 73 };
74 74
75 // ---------------------------- 75 // ----------------------------
76 76
77 class MediaControlOverlayEnclosureElement final : public MediaControlDivElement { 77 class MediaControlOverlayEnclosureElement final : public MediaControlDivElement {
78 public: 78 public:
79 static PassRefPtrWillBeRawPtr<MediaControlOverlayEnclosureElement> create(Me diaControls&); 79 static PassRefPtrWillBeRawPtr<MediaControlOverlayEnclosureElement> create(Me diaControls&);
80 80
81 private: 81 private:
82 explicit MediaControlOverlayEnclosureElement(MediaControls&); 82 explicit MediaControlOverlayEnclosureElement(MediaControls&);
83 virtual void* preDispatchEventHandler(Event*) override; 83 void* preDispatchEventHandler(Event*) override;
84 }; 84 };
85 85
86 // ---------------------------- 86 // ----------------------------
87 87
88 class MediaControlMuteButtonElement final : public MediaControlInputElement { 88 class MediaControlMuteButtonElement final : public MediaControlInputElement {
89 public: 89 public:
90 static PassRefPtrWillBeRawPtr<MediaControlMuteButtonElement> create(MediaCon trols&); 90 static PassRefPtrWillBeRawPtr<MediaControlMuteButtonElement> create(MediaCon trols&);
91 91
92 virtual bool willRespondToMouseClickEvents() override { return true; } 92 bool willRespondToMouseClickEvents() override { return true; }
93 virtual void updateDisplayType() override; 93 void updateDisplayType() override;
94 94
95 private: 95 private:
96 explicit MediaControlMuteButtonElement(MediaControls&); 96 explicit MediaControlMuteButtonElement(MediaControls&);
97 97
98 virtual void defaultEventHandler(Event*) override; 98 void defaultEventHandler(Event*) override;
99 }; 99 };
100 100
101 // ---------------------------- 101 // ----------------------------
102 102
103 class MediaControlPlayButtonElement final : public MediaControlInputElement { 103 class MediaControlPlayButtonElement final : public MediaControlInputElement {
104 public: 104 public:
105 static PassRefPtrWillBeRawPtr<MediaControlPlayButtonElement> create(MediaCon trols&); 105 static PassRefPtrWillBeRawPtr<MediaControlPlayButtonElement> create(MediaCon trols&);
106 106
107 virtual bool willRespondToMouseClickEvents() override { return true; } 107 bool willRespondToMouseClickEvents() override { return true; }
108 virtual void updateDisplayType() override; 108 void updateDisplayType() override;
109 109
110 private: 110 private:
111 explicit MediaControlPlayButtonElement(MediaControls&); 111 explicit MediaControlPlayButtonElement(MediaControls&);
112 112
113 virtual void defaultEventHandler(Event*) override; 113 void defaultEventHandler(Event*) override;
114 }; 114 };
115 115
116 // ---------------------------- 116 // ----------------------------
117 117
118 class MediaControlOverlayPlayButtonElement final : public MediaControlInputEleme nt { 118 class MediaControlOverlayPlayButtonElement final : public MediaControlInputEleme nt {
119 public: 119 public:
120 static PassRefPtrWillBeRawPtr<MediaControlOverlayPlayButtonElement> create(M ediaControls&); 120 static PassRefPtrWillBeRawPtr<MediaControlOverlayPlayButtonElement> create(M ediaControls&);
121 121
122 virtual void updateDisplayType() override; 122 void updateDisplayType() override;
123 123
124 private: 124 private:
125 explicit MediaControlOverlayPlayButtonElement(MediaControls&); 125 explicit MediaControlOverlayPlayButtonElement(MediaControls&);
126 126
127 virtual void defaultEventHandler(Event*) override; 127 void defaultEventHandler(Event*) override;
128 virtual bool keepEventInNode(Event*) override; 128 bool keepEventInNode(Event*) override;
129 }; 129 };
130 130
131 // ---------------------------- 131 // ----------------------------
132 132
133 class MediaControlToggleClosedCaptionsButtonElement final : public MediaControlI nputElement { 133 class MediaControlToggleClosedCaptionsButtonElement final : public MediaControlI nputElement {
134 public: 134 public:
135 static PassRefPtrWillBeRawPtr<MediaControlToggleClosedCaptionsButtonElement> create(MediaControls&); 135 static PassRefPtrWillBeRawPtr<MediaControlToggleClosedCaptionsButtonElement> create(MediaControls&);
136 136
137 virtual bool willRespondToMouseClickEvents() override { return true; } 137 bool willRespondToMouseClickEvents() override { return true; }
138 138
139 virtual void updateDisplayType() override; 139 void updateDisplayType() override;
140 140
141 private: 141 private:
142 explicit MediaControlToggleClosedCaptionsButtonElement(MediaControls&); 142 explicit MediaControlToggleClosedCaptionsButtonElement(MediaControls&);
143 143
144 virtual void defaultEventHandler(Event*) override; 144 void defaultEventHandler(Event*) override;
145 }; 145 };
146 146
147 // ---------------------------- 147 // ----------------------------
148 148
149 class MediaControlTimelineElement final : public MediaControlInputElement { 149 class MediaControlTimelineElement final : public MediaControlInputElement {
150 public: 150 public:
151 static PassRefPtrWillBeRawPtr<MediaControlTimelineElement> create(MediaContr ols&); 151 static PassRefPtrWillBeRawPtr<MediaControlTimelineElement> create(MediaContr ols&);
152 152
153 virtual bool willRespondToMouseClickEvents() override; 153 bool willRespondToMouseClickEvents() override;
154 154
155 // FIXME: An "earliest possible position" will be needed once that concept 155 // FIXME: An "earliest possible position" will be needed once that concept
156 // is supported by HTMLMediaElement, see https://crbug.com/137275 156 // is supported by HTMLMediaElement, see https://crbug.com/137275
157 void setPosition(double); 157 void setPosition(double);
158 void setDuration(double); 158 void setDuration(double);
159 159
160 private: 160 private:
161 explicit MediaControlTimelineElement(MediaControls&); 161 explicit MediaControlTimelineElement(MediaControls&);
162 162
163 virtual void defaultEventHandler(Event*) override; 163 void defaultEventHandler(Event*) override;
164 virtual bool keepEventInNode(Event*) override; 164 bool keepEventInNode(Event*) override;
165 }; 165 };
166 166
167 // ---------------------------- 167 // ----------------------------
168 168
169 class MediaControlFullscreenButtonElement final : public MediaControlInputElemen t { 169 class MediaControlFullscreenButtonElement final : public MediaControlInputElemen t {
170 public: 170 public:
171 static PassRefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> create(Me diaControls&); 171 static PassRefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> create(Me diaControls&);
172 172
173 virtual bool willRespondToMouseClickEvents() override { return true; } 173 bool willRespondToMouseClickEvents() override { return true; }
174 174
175 void setIsFullscreen(bool); 175 void setIsFullscreen(bool);
176 176
177 private: 177 private:
178 explicit MediaControlFullscreenButtonElement(MediaControls&); 178 explicit MediaControlFullscreenButtonElement(MediaControls&);
179 179
180 virtual void defaultEventHandler(Event*) override; 180 void defaultEventHandler(Event*) override;
181 }; 181 };
182 182
183 // ---------------------------- 183 // ----------------------------
184 184
185 class MediaControlCastButtonElement final : public MediaControlInputElement { 185 class MediaControlCastButtonElement final : public MediaControlInputElement {
186 public: 186 public:
187 static PassRefPtrWillBeRawPtr<MediaControlCastButtonElement> create(MediaCon trols&, bool isOverlayButton); 187 static PassRefPtrWillBeRawPtr<MediaControlCastButtonElement> create(MediaCon trols&, bool isOverlayButton);
188 188
189 virtual bool willRespondToMouseClickEvents() override { return true; } 189 bool willRespondToMouseClickEvents() override { return true; }
190 190
191 void setIsPlayingRemotely(bool); 191 void setIsPlayingRemotely(bool);
192 192
193 private: 193 private:
194 explicit MediaControlCastButtonElement(MediaControls&, bool isOverlayButton) ; 194 explicit MediaControlCastButtonElement(MediaControls&, bool isOverlayButton) ;
195 195
196 virtual const AtomicString& shadowPseudoId() const override; 196 const AtomicString& shadowPseudoId() const override;
197 virtual void defaultEventHandler(Event*) override; 197 void defaultEventHandler(Event*) override;
198 virtual bool keepEventInNode(Event*) override; 198 bool keepEventInNode(Event*) override;
199 199
200 bool m_isOverlayButton; 200 bool m_isOverlayButton;
201 }; 201 };
202 202
203 // ---------------------------- 203 // ----------------------------
204 204
205 class MediaControlVolumeSliderElement final : public MediaControlInputElement { 205 class MediaControlVolumeSliderElement final : public MediaControlInputElement {
206 public: 206 public:
207 static PassRefPtrWillBeRawPtr<MediaControlVolumeSliderElement> create(MediaC ontrols&); 207 static PassRefPtrWillBeRawPtr<MediaControlVolumeSliderElement> create(MediaC ontrols&);
208 208
209 virtual bool willRespondToMouseMoveEvents() override; 209 bool willRespondToMouseMoveEvents() override;
210 virtual bool willRespondToMouseClickEvents() override; 210 bool willRespondToMouseClickEvents() override;
211 void setVolume(double); 211 void setVolume(double);
212 212
213 private: 213 private:
214 explicit MediaControlVolumeSliderElement(MediaControls&); 214 explicit MediaControlVolumeSliderElement(MediaControls&);
215 215
216 virtual void defaultEventHandler(Event*) override; 216 void defaultEventHandler(Event*) override;
217 virtual bool keepEventInNode(Event*) override; 217 bool keepEventInNode(Event*) override;
218 }; 218 };
219 219
220 // ---------------------------- 220 // ----------------------------
221 221
222 class MediaControlTimeRemainingDisplayElement final : public MediaControlTimeDis playElement { 222 class MediaControlTimeRemainingDisplayElement final : public MediaControlTimeDis playElement {
223 public: 223 public:
224 static PassRefPtrWillBeRawPtr<MediaControlTimeRemainingDisplayElement> creat e(MediaControls&); 224 static PassRefPtrWillBeRawPtr<MediaControlTimeRemainingDisplayElement> creat e(MediaControls&);
225 225
226 private: 226 private:
227 explicit MediaControlTimeRemainingDisplayElement(MediaControls&); 227 explicit MediaControlTimeRemainingDisplayElement(MediaControls&);
228 }; 228 };
229 229
230 // ---------------------------- 230 // ----------------------------
231 231
232 class MediaControlCurrentTimeDisplayElement final : public MediaControlTimeDispl ayElement { 232 class MediaControlCurrentTimeDisplayElement final : public MediaControlTimeDispl ayElement {
233 public: 233 public:
234 static PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> create( MediaControls&); 234 static PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> create( MediaControls&);
235 235
236 private: 236 private:
237 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); 237 explicit MediaControlCurrentTimeDisplayElement(MediaControls&);
238 }; 238 };
239 239
240 } // namespace blink 240 } // namespace blink
241 241
242 #endif // MediaControlElements_h 242 #endif // MediaControlElements_h
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControlElementTypes.h ('k') | Source/core/html/shadow/MediaControls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698