OLD | NEW |
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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 #ifndef MediaControlElements_h | 30 #ifndef MediaControlElements_h |
31 #define MediaControlElements_h | 31 #define MediaControlElements_h |
32 | 32 |
33 #include "core/html/shadow/MediaControlElementTypes.h" | 33 #include "core/html/shadow/MediaControlElementTypes.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 // ---------------------------- | 37 // ---------------------------- |
38 | 38 |
39 class MediaControlPanelElement FINAL : public MediaControlDivElement { | 39 class MediaControlPanelElement final : public MediaControlDivElement { |
40 public: | 40 public: |
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 const AtomicString& shadowPseudoId() const OVERRIDE; | 51 virtual const AtomicString& shadowPseudoId() const override; |
52 virtual void defaultEventHandler(Event*) OVERRIDE; | 52 virtual void defaultEventHandler(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 virtual bool keepEventInNode(Event*) OVERRIDE; | 57 virtual bool keepEventInNode(Event*) override; |
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; |
63 }; | 63 }; |
64 | 64 |
65 // ---------------------------- | 65 // ---------------------------- |
66 | 66 |
67 class MediaControlPanelEnclosureElement FINAL : public MediaControlDivElement { | 67 class MediaControlPanelEnclosureElement final : public MediaControlDivElement { |
68 public: | 68 public: |
69 static PassRefPtrWillBeRawPtr<MediaControlPanelEnclosureElement> create(Medi
aControls&); | 69 static PassRefPtrWillBeRawPtr<MediaControlPanelEnclosureElement> create(Medi
aControls&); |
70 | 70 |
71 private: | 71 private: |
72 explicit MediaControlPanelEnclosureElement(MediaControls&); | 72 explicit MediaControlPanelEnclosureElement(MediaControls&); |
73 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 73 virtual const AtomicString& shadowPseudoId() const override; |
74 }; | 74 }; |
75 | 75 |
76 // ---------------------------- | 76 // ---------------------------- |
77 | 77 |
78 class MediaControlOverlayEnclosureElement FINAL : public MediaControlDivElement
{ | 78 class MediaControlOverlayEnclosureElement final : public MediaControlDivElement
{ |
79 public: | 79 public: |
80 static PassRefPtrWillBeRawPtr<MediaControlOverlayEnclosureElement> create(Me
diaControls&); | 80 static PassRefPtrWillBeRawPtr<MediaControlOverlayEnclosureElement> create(Me
diaControls&); |
81 | 81 |
82 private: | 82 private: |
83 explicit MediaControlOverlayEnclosureElement(MediaControls&); | 83 explicit MediaControlOverlayEnclosureElement(MediaControls&); |
84 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 84 virtual const AtomicString& shadowPseudoId() const override; |
85 virtual void* preDispatchEventHandler(Event*) OVERRIDE; | 85 virtual void* preDispatchEventHandler(Event*) override; |
86 }; | 86 }; |
87 | 87 |
88 // ---------------------------- | 88 // ---------------------------- |
89 | 89 |
90 class MediaControlMuteButtonElement FINAL : public MediaControlInputElement { | 90 class MediaControlMuteButtonElement final : public MediaControlInputElement { |
91 public: | 91 public: |
92 static PassRefPtrWillBeRawPtr<MediaControlMuteButtonElement> create(MediaCon
trols&); | 92 static PassRefPtrWillBeRawPtr<MediaControlMuteButtonElement> create(MediaCon
trols&); |
93 | 93 |
94 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; } | 94 virtual bool willRespondToMouseClickEvents() override { return true; } |
95 virtual void updateDisplayType() OVERRIDE; | 95 virtual void updateDisplayType() override; |
96 | 96 |
97 private: | 97 private: |
98 explicit MediaControlMuteButtonElement(MediaControls&); | 98 explicit MediaControlMuteButtonElement(MediaControls&); |
99 | 99 |
100 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 100 virtual const AtomicString& shadowPseudoId() const override; |
101 virtual void defaultEventHandler(Event*) OVERRIDE; | 101 virtual void defaultEventHandler(Event*) override; |
102 }; | 102 }; |
103 | 103 |
104 // ---------------------------- | 104 // ---------------------------- |
105 | 105 |
106 class MediaControlPlayButtonElement FINAL : public MediaControlInputElement { | 106 class MediaControlPlayButtonElement final : public MediaControlInputElement { |
107 public: | 107 public: |
108 static PassRefPtrWillBeRawPtr<MediaControlPlayButtonElement> create(MediaCon
trols&); | 108 static PassRefPtrWillBeRawPtr<MediaControlPlayButtonElement> create(MediaCon
trols&); |
109 | 109 |
110 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; } | 110 virtual bool willRespondToMouseClickEvents() override { return true; } |
111 virtual void updateDisplayType() OVERRIDE; | 111 virtual void updateDisplayType() override; |
112 | 112 |
113 private: | 113 private: |
114 explicit MediaControlPlayButtonElement(MediaControls&); | 114 explicit MediaControlPlayButtonElement(MediaControls&); |
115 | 115 |
116 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 116 virtual const AtomicString& shadowPseudoId() const override; |
117 virtual void defaultEventHandler(Event*) OVERRIDE; | 117 virtual void defaultEventHandler(Event*) override; |
118 }; | 118 }; |
119 | 119 |
120 // ---------------------------- | 120 // ---------------------------- |
121 | 121 |
122 class MediaControlOverlayPlayButtonElement FINAL : public MediaControlInputEleme
nt { | 122 class MediaControlOverlayPlayButtonElement final : public MediaControlInputEleme
nt { |
123 public: | 123 public: |
124 static PassRefPtrWillBeRawPtr<MediaControlOverlayPlayButtonElement> create(M
ediaControls&); | 124 static PassRefPtrWillBeRawPtr<MediaControlOverlayPlayButtonElement> create(M
ediaControls&); |
125 | 125 |
126 virtual void updateDisplayType() OVERRIDE; | 126 virtual void updateDisplayType() override; |
127 | 127 |
128 private: | 128 private: |
129 explicit MediaControlOverlayPlayButtonElement(MediaControls&); | 129 explicit MediaControlOverlayPlayButtonElement(MediaControls&); |
130 | 130 |
131 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 131 virtual const AtomicString& shadowPseudoId() const override; |
132 virtual void defaultEventHandler(Event*) OVERRIDE; | 132 virtual void defaultEventHandler(Event*) override; |
133 virtual bool keepEventInNode(Event*) OVERRIDE; | 133 virtual bool keepEventInNode(Event*) override; |
134 }; | 134 }; |
135 | 135 |
136 // ---------------------------- | 136 // ---------------------------- |
137 | 137 |
138 class MediaControlToggleClosedCaptionsButtonElement FINAL : public MediaControlI
nputElement { | 138 class MediaControlToggleClosedCaptionsButtonElement final : public MediaControlI
nputElement { |
139 public: | 139 public: |
140 static PassRefPtrWillBeRawPtr<MediaControlToggleClosedCaptionsButtonElement>
create(MediaControls&); | 140 static PassRefPtrWillBeRawPtr<MediaControlToggleClosedCaptionsButtonElement>
create(MediaControls&); |
141 | 141 |
142 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; } | 142 virtual bool willRespondToMouseClickEvents() override { return true; } |
143 | 143 |
144 virtual void updateDisplayType() OVERRIDE; | 144 virtual void updateDisplayType() override; |
145 | 145 |
146 private: | 146 private: |
147 explicit MediaControlToggleClosedCaptionsButtonElement(MediaControls&); | 147 explicit MediaControlToggleClosedCaptionsButtonElement(MediaControls&); |
148 | 148 |
149 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 149 virtual const AtomicString& shadowPseudoId() const override; |
150 virtual void defaultEventHandler(Event*) OVERRIDE; | 150 virtual void defaultEventHandler(Event*) override; |
151 }; | 151 }; |
152 | 152 |
153 // ---------------------------- | 153 // ---------------------------- |
154 | 154 |
155 class MediaControlTimelineElement FINAL : public MediaControlInputElement { | 155 class MediaControlTimelineElement final : public MediaControlInputElement { |
156 public: | 156 public: |
157 static PassRefPtrWillBeRawPtr<MediaControlTimelineElement> create(MediaContr
ols&); | 157 static PassRefPtrWillBeRawPtr<MediaControlTimelineElement> create(MediaContr
ols&); |
158 | 158 |
159 virtual bool willRespondToMouseClickEvents() OVERRIDE; | 159 virtual bool willRespondToMouseClickEvents() override; |
160 | 160 |
161 // FIXME: An "earliest possible position" will be needed once that concept | 161 // FIXME: An "earliest possible position" will be needed once that concept |
162 // is supported by HTMLMediaElement, see https://crbug.com/137275 | 162 // is supported by HTMLMediaElement, see https://crbug.com/137275 |
163 void setPosition(double); | 163 void setPosition(double); |
164 void setDuration(double); | 164 void setDuration(double); |
165 | 165 |
166 private: | 166 private: |
167 explicit MediaControlTimelineElement(MediaControls&); | 167 explicit MediaControlTimelineElement(MediaControls&); |
168 | 168 |
169 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 169 virtual const AtomicString& shadowPseudoId() const override; |
170 virtual void defaultEventHandler(Event*) OVERRIDE; | 170 virtual void defaultEventHandler(Event*) override; |
171 virtual bool keepEventInNode(Event*) OVERRIDE; | 171 virtual bool keepEventInNode(Event*) override; |
172 }; | 172 }; |
173 | 173 |
174 // ---------------------------- | 174 // ---------------------------- |
175 | 175 |
176 class MediaControlFullscreenButtonElement FINAL : public MediaControlInputElemen
t { | 176 class MediaControlFullscreenButtonElement final : public MediaControlInputElemen
t { |
177 public: | 177 public: |
178 static PassRefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> create(Me
diaControls&); | 178 static PassRefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> create(Me
diaControls&); |
179 | 179 |
180 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; } | 180 virtual bool willRespondToMouseClickEvents() override { return true; } |
181 | 181 |
182 void setIsFullscreen(bool); | 182 void setIsFullscreen(bool); |
183 | 183 |
184 private: | 184 private: |
185 explicit MediaControlFullscreenButtonElement(MediaControls&); | 185 explicit MediaControlFullscreenButtonElement(MediaControls&); |
186 | 186 |
187 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 187 virtual const AtomicString& shadowPseudoId() const override; |
188 virtual void defaultEventHandler(Event*) OVERRIDE; | 188 virtual void defaultEventHandler(Event*) override; |
189 }; | 189 }; |
190 | 190 |
191 // ---------------------------- | 191 // ---------------------------- |
192 | 192 |
193 class MediaControlCastButtonElement FINAL : public MediaControlInputElement { | 193 class MediaControlCastButtonElement final : public MediaControlInputElement { |
194 public: | 194 public: |
195 static PassRefPtrWillBeRawPtr<MediaControlCastButtonElement> create(MediaCon
trols&, bool isOverlayButton); | 195 static PassRefPtrWillBeRawPtr<MediaControlCastButtonElement> create(MediaCon
trols&, bool isOverlayButton); |
196 | 196 |
197 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; } | 197 virtual bool willRespondToMouseClickEvents() override { return true; } |
198 | 198 |
199 void setIsPlayingRemotely(bool); | 199 void setIsPlayingRemotely(bool); |
200 | 200 |
201 private: | 201 private: |
202 explicit MediaControlCastButtonElement(MediaControls&, bool isOverlayButton)
; | 202 explicit MediaControlCastButtonElement(MediaControls&, bool isOverlayButton)
; |
203 | 203 |
204 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 204 virtual const AtomicString& shadowPseudoId() const override; |
205 virtual void defaultEventHandler(Event*) OVERRIDE; | 205 virtual void defaultEventHandler(Event*) override; |
206 virtual bool keepEventInNode(Event*) OVERRIDE; | 206 virtual bool keepEventInNode(Event*) override; |
207 | 207 |
208 bool m_isOverlayButton; | 208 bool m_isOverlayButton; |
209 }; | 209 }; |
210 | 210 |
211 // ---------------------------- | 211 // ---------------------------- |
212 | 212 |
213 class MediaControlVolumeSliderElement FINAL : public MediaControlInputElement { | 213 class MediaControlVolumeSliderElement final : public MediaControlInputElement { |
214 public: | 214 public: |
215 static PassRefPtrWillBeRawPtr<MediaControlVolumeSliderElement> create(MediaC
ontrols&); | 215 static PassRefPtrWillBeRawPtr<MediaControlVolumeSliderElement> create(MediaC
ontrols&); |
216 | 216 |
217 virtual bool willRespondToMouseMoveEvents() OVERRIDE; | 217 virtual bool willRespondToMouseMoveEvents() override; |
218 virtual bool willRespondToMouseClickEvents() OVERRIDE; | 218 virtual bool willRespondToMouseClickEvents() override; |
219 void setVolume(double); | 219 void setVolume(double); |
220 | 220 |
221 private: | 221 private: |
222 explicit MediaControlVolumeSliderElement(MediaControls&); | 222 explicit MediaControlVolumeSliderElement(MediaControls&); |
223 | 223 |
224 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 224 virtual const AtomicString& shadowPseudoId() const override; |
225 virtual void defaultEventHandler(Event*) OVERRIDE; | 225 virtual void defaultEventHandler(Event*) override; |
226 virtual bool keepEventInNode(Event*) OVERRIDE; | 226 virtual bool keepEventInNode(Event*) override; |
227 }; | 227 }; |
228 | 228 |
229 // ---------------------------- | 229 // ---------------------------- |
230 | 230 |
231 class MediaControlTimeRemainingDisplayElement FINAL : public MediaControlTimeDis
playElement { | 231 class MediaControlTimeRemainingDisplayElement final : public MediaControlTimeDis
playElement { |
232 public: | 232 public: |
233 static PassRefPtrWillBeRawPtr<MediaControlTimeRemainingDisplayElement> creat
e(MediaControls&); | 233 static PassRefPtrWillBeRawPtr<MediaControlTimeRemainingDisplayElement> creat
e(MediaControls&); |
234 | 234 |
235 private: | 235 private: |
236 explicit MediaControlTimeRemainingDisplayElement(MediaControls&); | 236 explicit MediaControlTimeRemainingDisplayElement(MediaControls&); |
237 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 237 virtual const AtomicString& shadowPseudoId() const override; |
238 }; | 238 }; |
239 | 239 |
240 // ---------------------------- | 240 // ---------------------------- |
241 | 241 |
242 class MediaControlCurrentTimeDisplayElement FINAL : public MediaControlTimeDispl
ayElement { | 242 class MediaControlCurrentTimeDisplayElement final : public MediaControlTimeDispl
ayElement { |
243 public: | 243 public: |
244 static PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> create(
MediaControls&); | 244 static PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> create(
MediaControls&); |
245 | 245 |
246 private: | 246 private: |
247 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); | 247 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); |
248 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 248 virtual const AtomicString& shadowPseudoId() const override; |
249 }; | 249 }; |
250 | 250 |
251 // ---------------------------- | 251 // ---------------------------- |
252 | 252 |
253 class MediaControlTextTrackContainerElement FINAL : public MediaControlDivElemen
t { | 253 class MediaControlTextTrackContainerElement final : public MediaControlDivElemen
t { |
254 public: | 254 public: |
255 static PassRefPtrWillBeRawPtr<MediaControlTextTrackContainerElement> create(
MediaControls&); | 255 static PassRefPtrWillBeRawPtr<MediaControlTextTrackContainerElement> create(
MediaControls&); |
256 | 256 |
257 void updateDisplay(); | 257 void updateDisplay(); |
258 void updateSizes(); | 258 void updateSizes(); |
259 static const AtomicString& textTrackContainerElementShadowPseudoId(); | 259 static const AtomicString& textTrackContainerElementShadowPseudoId(); |
260 | 260 |
261 private: | 261 private: |
262 explicit MediaControlTextTrackContainerElement(MediaControls&); | 262 explicit MediaControlTextTrackContainerElement(MediaControls&); |
263 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 263 virtual const AtomicString& shadowPseudoId() const override; |
264 | 264 |
265 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 265 virtual RenderObject* createRenderer(RenderStyle*) override; |
266 | 266 |
267 IntRect m_videoDisplaySize; | 267 IntRect m_videoDisplaySize; |
268 float m_fontSize; | 268 float m_fontSize; |
269 }; | 269 }; |
270 | 270 |
271 | 271 |
272 } // namespace blink | 272 } // namespace blink |
273 | 273 |
274 #endif // MediaControlElements_h | 274 #endif // MediaControlElements_h |
OLD | NEW |