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 13 matching lines...) Expand all Loading... |
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
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 #include "core/html/shadow/MediaControlTimelineMetrics.h" |
34 #include "public/platform/WebLocalizedString.h" | 35 #include "public/platform/WebLocalizedString.h" |
35 | 36 |
36 namespace blink { | 37 namespace blink { |
37 | 38 |
38 class TextTrack; | 39 class TextTrack; |
39 | 40 |
40 // ---------------------------- | 41 // ---------------------------- |
41 | 42 |
42 class CORE_EXPORT MediaControlPanelElement final | 43 class CORE_EXPORT MediaControlPanelElement final |
43 : public MediaControlDivElement { | 44 : public MediaControlDivElement { |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 public: | 273 public: |
273 static MediaControlTimelineElement* create(MediaControls&); | 274 static MediaControlTimelineElement* create(MediaControls&); |
274 | 275 |
275 bool willRespondToMouseClickEvents() override; | 276 bool willRespondToMouseClickEvents() override; |
276 | 277 |
277 // FIXME: An "earliest possible position" will be needed once that concept | 278 // FIXME: An "earliest possible position" will be needed once that concept |
278 // is supported by HTMLMediaElement, see https://crbug.com/137275 | 279 // is supported by HTMLMediaElement, see https://crbug.com/137275 |
279 void setPosition(double); | 280 void setPosition(double); |
280 void setDuration(double); | 281 void setDuration(double); |
281 | 282 |
| 283 void onPlaying(); |
| 284 |
282 private: | 285 private: |
283 explicit MediaControlTimelineElement(MediaControls&); | 286 explicit MediaControlTimelineElement(MediaControls&); |
284 | 287 |
285 void defaultEventHandler(Event*) override; | 288 void defaultEventHandler(Event*) override; |
286 bool keepEventInNode(Event*) override; | 289 bool keepEventInNode(Event*) override; |
| 290 |
| 291 // Width in CSS pixels * pageZoomFactor (ignores CSS transforms for |
| 292 // simplicity; deliberately ignores pinch zoom's pageScaleFactor). |
| 293 int timelineWidth(); |
| 294 |
| 295 MediaControlTimelineMetrics m_metrics; |
287 }; | 296 }; |
288 | 297 |
289 // ---------------------------- | 298 // ---------------------------- |
290 | 299 |
291 class CORE_EXPORT MediaControlFullscreenButtonElement final | 300 class CORE_EXPORT MediaControlFullscreenButtonElement final |
292 : public MediaControlInputElement { | 301 : public MediaControlInputElement { |
293 public: | 302 public: |
294 static MediaControlFullscreenButtonElement* create(MediaControls&); | 303 static MediaControlFullscreenButtonElement* create(MediaControls&); |
295 | 304 |
296 bool willRespondToMouseClickEvents() override { return true; } | 305 bool willRespondToMouseClickEvents() override { return true; } |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 public: | 396 public: |
388 static MediaControlCurrentTimeDisplayElement* create(MediaControls&); | 397 static MediaControlCurrentTimeDisplayElement* create(MediaControls&); |
389 | 398 |
390 private: | 399 private: |
391 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); | 400 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); |
392 }; | 401 }; |
393 | 402 |
394 } // namespace blink | 403 } // namespace blink |
395 | 404 |
396 #endif // MediaControlElements_h | 405 #endif // MediaControlElements_h |
OLD | NEW |