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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 public: | 208 public: |
209 static MediaControlOverflowMenuListElement* create(MediaControls&); | 209 static MediaControlOverflowMenuListElement* create(MediaControls&); |
210 | 210 |
211 private: | 211 private: |
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 |
| 219 // downloadable. |
| 220 class MediaControlDownloadButtonElement final : public MediaControlInputElement
{ |
| 221 public: |
| 222 static MediaControlDownloadButtonElement* create(MediaControls&, Document*); |
| 223 |
| 224 WebLocalizedString::Name getOverflowStringName() override; |
| 225 |
| 226 // 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. |
| 228 bool shouldDisplayDownloadButton(); |
| 229 |
| 230 private: |
| 231 explicit MediaControlDownloadButtonElement(MediaControls&); |
| 232 |
| 233 void defaultEventHandler(Event*) override; |
| 234 }; |
218 | 235 |
219 class MediaControlTimelineElement final : public MediaControlInputElement { | 236 class MediaControlTimelineElement final : public MediaControlInputElement { |
220 public: | 237 public: |
221 static MediaControlTimelineElement* create(MediaControls&); | 238 static MediaControlTimelineElement* create(MediaControls&); |
222 | 239 |
223 bool willRespondToMouseClickEvents() override; | 240 bool willRespondToMouseClickEvents() override; |
224 | 241 |
225 // FIXME: An "earliest possible position" will be needed once that concept | 242 // FIXME: An "earliest possible position" will be needed once that concept |
226 // is supported by HTMLMediaElement, see https://crbug.com/137275 | 243 // is supported by HTMLMediaElement, see https://crbug.com/137275 |
227 void setPosition(double); | 244 void setPosition(double); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 public: | 347 public: |
331 static MediaControlCurrentTimeDisplayElement* create(MediaControls&); | 348 static MediaControlCurrentTimeDisplayElement* create(MediaControls&); |
332 | 349 |
333 private: | 350 private: |
334 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); | 351 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); |
335 }; | 352 }; |
336 | 353 |
337 } // namespace blink | 354 } // namespace blink |
338 | 355 |
339 #endif // MediaControlElements_h | 356 #endif // MediaControlElements_h |
OLD | NEW |