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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 explicit MediaControlOverflowMenuListElement(MediaControls&); | 212 explicit MediaControlOverflowMenuListElement(MediaControls&); |
213 | 213 |
214 void defaultEventHandler(Event*) override; | 214 void defaultEventHandler(Event*) override; |
215 }; | 215 }; |
216 | 216 |
217 // ---------------------------- | 217 // ---------------------------- |
218 // Represents a button that allows users to download media if the file is | 218 // Represents a button that allows users to download media if the file is |
219 // downloadable. | 219 // downloadable. |
220 class MediaControlDownloadButtonElement final : public MediaControlInputElement
{ | 220 class MediaControlDownloadButtonElement final : public MediaControlInputElement
{ |
221 public: | 221 public: |
222 static MediaControlDownloadButtonElement* create(MediaControls&, Document*); | 222 static MediaControlDownloadButtonElement* create(MediaControls&); |
223 | 223 |
224 WebLocalizedString::Name getOverflowStringName() override; | 224 WebLocalizedString::Name getOverflowStringName() override; |
225 | 225 |
| 226 bool hasOverflowButton() override { return true; } |
| 227 |
226 // Returns true if the download button should be shown. We should | 228 // Returns true if the download button should be shown. We should |
227 // show the button for only non-MSE, non-EME, and non-MediaStream content. | 229 // show the button for only non-MSE, non-EME, and non-MediaStream content. |
228 bool shouldDisplayDownloadButton(); | 230 bool shouldDisplayDownloadButton(); |
229 | 231 |
| 232 DECLARE_VIRTUAL_TRACE(); |
| 233 |
230 private: | 234 private: |
231 explicit MediaControlDownloadButtonElement(MediaControls&); | 235 explicit MediaControlDownloadButtonElement(MediaControls&); |
232 | 236 |
233 void defaultEventHandler(Event*) override; | 237 void defaultEventHandler(Event*) override; |
| 238 |
| 239 // Points to an anchor element that contains the URL of the media file. |
| 240 Member<HTMLAnchorElement> m_anchor; |
234 }; | 241 }; |
235 | 242 |
236 class MediaControlTimelineElement final : public MediaControlInputElement { | 243 class MediaControlTimelineElement final : public MediaControlInputElement { |
237 public: | 244 public: |
238 static MediaControlTimelineElement* create(MediaControls&); | 245 static MediaControlTimelineElement* create(MediaControls&); |
239 | 246 |
240 bool willRespondToMouseClickEvents() override; | 247 bool willRespondToMouseClickEvents() override; |
241 | 248 |
242 // FIXME: An "earliest possible position" will be needed once that concept | 249 // FIXME: An "earliest possible position" will be needed once that concept |
243 // is supported by HTMLMediaElement, see https://crbug.com/137275 | 250 // is supported by HTMLMediaElement, see https://crbug.com/137275 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 public: | 354 public: |
348 static MediaControlCurrentTimeDisplayElement* create(MediaControls&); | 355 static MediaControlCurrentTimeDisplayElement* create(MediaControls&); |
349 | 356 |
350 private: | 357 private: |
351 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); | 358 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); |
352 }; | 359 }; |
353 | 360 |
354 } // namespace blink | 361 } // namespace blink |
355 | 362 |
356 #endif // MediaControlElements_h | 363 #endif // MediaControlElements_h |
OLD | NEW |