OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL; | 368 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL; |
369 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) OVERRIDE F
INAL; | 369 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) OVERRIDE F
INAL; |
370 | 370 |
371 void loadTimerFired(Timer<HTMLMediaElement>*); | 371 void loadTimerFired(Timer<HTMLMediaElement>*); |
372 void progressEventTimerFired(Timer<HTMLMediaElement>*); | 372 void progressEventTimerFired(Timer<HTMLMediaElement>*); |
373 void playbackProgressTimerFired(Timer<HTMLMediaElement>*); | 373 void playbackProgressTimerFired(Timer<HTMLMediaElement>*); |
374 void startPlaybackProgressTimer(); | 374 void startPlaybackProgressTimer(); |
375 void startProgressEventTimer(); | 375 void startProgressEventTimer(); |
376 void stopPeriodicTimers(); | 376 void stopPeriodicTimers(); |
377 | 377 |
378 void seek(double time, ExceptionState&); | 378 void seek(double time); |
379 void finishSeek(); | 379 void finishSeek(); |
380 void checkIfSeekNeeded(); | 380 void checkIfSeekNeeded(); |
381 void addPlayedRange(double start, double end); | 381 void addPlayedRange(double start, double end); |
382 | 382 |
383 void scheduleTimeupdateEvent(bool periodicEvent); | 383 void scheduleTimeupdateEvent(bool periodicEvent); |
384 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched
uleNamedEvent for clarity. | 384 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched
uleNamedEvent for clarity. |
385 | 385 |
386 // loading | 386 // loading |
387 void prepareForLoad(); | 387 void prepareForLoad(); |
388 void loadInternal(); | 388 void loadInternal(); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 | 501 |
502 // Cached duration to suppress duplicate events if duration unchanged. | 502 // Cached duration to suppress duplicate events if duration unchanged. |
503 double m_duration; | 503 double m_duration; |
504 | 504 |
505 // The last time a timeupdate event was sent (wall clock). | 505 // The last time a timeupdate event was sent (wall clock). |
506 double m_lastTimeUpdateEventWallTime; | 506 double m_lastTimeUpdateEventWallTime; |
507 | 507 |
508 // The last time a timeupdate event was sent in movie time. | 508 // The last time a timeupdate event was sent in movie time. |
509 double m_lastTimeUpdateEventMovieTime; | 509 double m_lastTimeUpdateEventMovieTime; |
510 | 510 |
| 511 // The default playback start position. |
| 512 double m_defaultPlaybackStartPosition; |
| 513 |
511 // Loading state. | 514 // Loading state. |
512 enum LoadState { WaitingForSource, LoadingFromSrcAttr, LoadingFromSourceElem
ent }; | 515 enum LoadState { WaitingForSource, LoadingFromSrcAttr, LoadingFromSourceElem
ent }; |
513 LoadState m_loadState; | 516 LoadState m_loadState; |
514 RefPtrWillBeMember<HTMLSourceElement> m_currentSourceNode; | 517 RefPtrWillBeMember<HTMLSourceElement> m_currentSourceNode; |
515 RefPtrWillBeMember<Node> m_nextChildNodeToConsider; | 518 RefPtrWillBeMember<Node> m_nextChildNodeToConsider; |
516 | 519 |
517 // "Deferred loading" state (for preload=none). | 520 // "Deferred loading" state (for preload=none). |
518 enum DeferredLoadState { | 521 enum DeferredLoadState { |
519 // The load is not deferred. | 522 // The load is not deferred. |
520 NotDeferred, | 523 NotDeferred, |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 inline bool isHTMLMediaElement(const HTMLElement& element) | 634 inline bool isHTMLMediaElement(const HTMLElement& element) |
632 { | 635 { |
633 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 636 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
634 } | 637 } |
635 | 638 |
636 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 639 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
637 | 640 |
638 } //namespace | 641 } //namespace |
639 | 642 |
640 #endif | 643 #endif |
OLD | NEW |