| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #endif | 52 #endif |
| 53 class AudioTrackList; | 53 class AudioTrackList; |
| 54 class ContentType; | 54 class ContentType; |
| 55 class Event; | 55 class Event; |
| 56 class ExceptionState; | 56 class ExceptionState; |
| 57 class HTMLSourceElement; | 57 class HTMLSourceElement; |
| 58 class HTMLTrackElement; | 58 class HTMLTrackElement; |
| 59 class KURL; | 59 class KURL; |
| 60 class MediaController; | 60 class MediaController; |
| 61 class MediaControls; | 61 class MediaControls; |
| 62 class MediaProvider; |
| 62 class MediaError; | 63 class MediaError; |
| 63 class HTMLMediaSource; | 64 class HTMLMediaSource; |
| 64 class TextTrackList; | 65 class TextTrackList; |
| 65 class TimeRanges; | 66 class TimeRanges; |
| 66 class URLRegistry; | 67 class URLRegistry; |
| 67 class VideoTrackList; | 68 class VideoTrackList; |
| 68 | 69 |
| 69 typedef PODIntervalTree<double, TextTrackCue*> CueIntervalTree; | 70 typedef PODIntervalTree<double, TextTrackCue*> CueIntervalTree; |
| 70 typedef CueIntervalTree::IntervalType CueInterval; | 71 typedef CueIntervalTree::IntervalType CueInterval; |
| 71 typedef Vector<CueInterval> CueList; | 72 typedef Vector<CueInterval> CueList; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 }; | 109 }; |
| 109 void scheduleDelayedAction(DelayedActionType); | 110 void scheduleDelayedAction(DelayedActionType); |
| 110 | 111 |
| 111 bool isActive() const { return m_active; } | 112 bool isActive() const { return m_active; } |
| 112 | 113 |
| 113 // error state | 114 // error state |
| 114 PassRefPtrWillBeRawPtr<MediaError> error() const; | 115 PassRefPtrWillBeRawPtr<MediaError> error() const; |
| 115 | 116 |
| 116 // network state | 117 // network state |
| 117 void setSrc(const AtomicString&); | 118 void setSrc(const AtomicString&); |
| 119 void setSrcObject(PassRefPtrWillBeRawPtr<MediaProvider> mediaProvider); |
| 120 MediaProvider* srcObject() const; |
| 118 const KURL& currentSrc() const { return m_currentSrc; } | 121 const KURL& currentSrc() const { return m_currentSrc; } |
| 119 | 122 |
| 120 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; | 123 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; |
| 121 NetworkState networkState() const; | 124 NetworkState networkState() const; |
| 122 | 125 |
| 123 String preload() const; | 126 String preload() const; |
| 124 void setPreload(const AtomicString&); | 127 void setPreload(const AtomicString&); |
| 125 | 128 |
| 126 PassRefPtrWillBeRawPtr<TimeRanges> buffered() const; | 129 PassRefPtrWillBeRawPtr<TimeRanges> buffered() const; |
| 127 void load(); | 130 void load(); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 389 |
| 387 // loading | 390 // loading |
| 388 void prepareForLoad(); | 391 void prepareForLoad(); |
| 389 void loadInternal(); | 392 void loadInternal(); |
| 390 void selectMediaResource(); | 393 void selectMediaResource(); |
| 391 void loadResource(const KURL&, ContentType&, const String& keySystem); | 394 void loadResource(const KURL&, ContentType&, const String& keySystem); |
| 392 void startPlayerLoad(); | 395 void startPlayerLoad(); |
| 393 void setPlayerPreload(); | 396 void setPlayerPreload(); |
| 394 blink::WebMediaPlayer::LoadType loadType() const; | 397 blink::WebMediaPlayer::LoadType loadType() const; |
| 395 void scheduleNextSourceChild(); | 398 void scheduleNextSourceChild(); |
| 399 void loadSourceFromObject(); |
| 400 void loadSourceFromAttribute(); |
| 396 void loadNextSourceChild(); | 401 void loadNextSourceChild(); |
| 397 void userCancelledLoad(); | 402 void userCancelledLoad(); |
| 398 void clearMediaPlayer(int flags); | 403 void clearMediaPlayer(int flags); |
| 399 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); | 404 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); |
| 400 bool havePotentialSourceChild(); | 405 bool havePotentialSourceChild(); |
| 401 void noneSupported(); | 406 void noneSupported(); |
| 402 void mediaEngineError(PassRefPtrWillBeRawPtr<MediaError>); | 407 void mediaEngineError(PassRefPtrWillBeRawPtr<MediaError>); |
| 403 void cancelPendingEventsAndCallbacks(); | 408 void cancelPendingEventsAndCallbacks(); |
| 404 void waitForSourceChange(); | 409 void waitForSourceChange(); |
| 405 void prepareToPlay(); | 410 void prepareToPlay(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 // Cached duration to suppress duplicate events if duration unchanged. | 508 // Cached duration to suppress duplicate events if duration unchanged. |
| 504 double m_duration; | 509 double m_duration; |
| 505 | 510 |
| 506 // The last time a timeupdate event was sent (wall clock). | 511 // The last time a timeupdate event was sent (wall clock). |
| 507 double m_lastTimeUpdateEventWallTime; | 512 double m_lastTimeUpdateEventWallTime; |
| 508 | 513 |
| 509 // The last time a timeupdate event was sent in movie time. | 514 // The last time a timeupdate event was sent in movie time. |
| 510 double m_lastTimeUpdateEventMovieTime; | 515 double m_lastTimeUpdateEventMovieTime; |
| 511 | 516 |
| 512 // Loading state. | 517 // Loading state. |
| 513 enum LoadState { WaitingForSource, LoadingFromSrcAttr, LoadingFromSourceElem
ent }; | 518 enum LoadState { WaitingForSource, LoadingFromSrcObject, LoadingFromSrcAttr,
LoadingFromSourceElement }; |
| 514 LoadState m_loadState; | 519 LoadState m_loadState; |
| 520 RefPtrWillBeMember<MediaProvider> m_srcObject; |
| 515 RefPtrWillBeMember<HTMLSourceElement> m_currentSourceNode; | 521 RefPtrWillBeMember<HTMLSourceElement> m_currentSourceNode; |
| 516 RefPtrWillBeMember<Node> m_nextChildNodeToConsider; | 522 RefPtrWillBeMember<Node> m_nextChildNodeToConsider; |
| 517 | 523 |
| 518 // "Deferred loading" state (for preload=none). | 524 // "Deferred loading" state (for preload=none). |
| 519 enum DeferredLoadState { | 525 enum DeferredLoadState { |
| 520 // The load is not deferred. | 526 // The load is not deferred. |
| 521 NotDeferred, | 527 NotDeferred, |
| 522 // The load is deferred, and waiting for the task to set the | 528 // The load is deferred, and waiting for the task to set the |
| 523 // delaying-the-load-event flag (to false). | 529 // delaying-the-load-event flag (to false). |
| 524 WaitingForStopDelayingLoadEventTask, | 530 WaitingForStopDelayingLoadEventTask, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 inline bool isHTMLMediaElement(const HTMLElement& element) | 638 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 633 { | 639 { |
| 634 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 640 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 635 } | 641 } |
| 636 | 642 |
| 637 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 643 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 638 | 644 |
| 639 } // namespace blink | 645 } // namespace blink |
| 640 | 646 |
| 641 #endif // HTMLMediaElement_h | 647 #endif // HTMLMediaElement_h |
| OLD | NEW |