| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 PassRefPtrWillBeRawPtr<MediaError> error() const; | 106 PassRefPtrWillBeRawPtr<MediaError> error() const; |
| 107 | 107 |
| 108 // network state | 108 // network state |
| 109 void setSrc(const AtomicString&); | 109 void setSrc(const AtomicString&); |
| 110 const KURL& currentSrc() const { return m_currentSrc; } | 110 const KURL& currentSrc() const { return m_currentSrc; } |
| 111 | 111 |
| 112 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; | 112 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; |
| 113 NetworkState networkState() const; | 113 NetworkState networkState() const; |
| 114 | 114 |
| 115 String preload() const; | 115 String preload() const; |
| 116 void setPreload(const AtomicString&); |
| 117 MediaPlayer::Preload preloadType() const; |
| 116 MediaPlayer::Preload effectivePreloadType() const; | 118 MediaPlayer::Preload effectivePreloadType() const; |
| 117 void setPreload(const AtomicString&); | |
| 118 | 119 |
| 119 PassRefPtrWillBeRawPtr<TimeRanges> buffered() const; | 120 PassRefPtrWillBeRawPtr<TimeRanges> buffered() const; |
| 120 void load(); | 121 void load(); |
| 121 String canPlayType(const String& mimeType, const String& keySystem = String(
)) const; | 122 String canPlayType(const String& mimeType, const String& keySystem = String(
)) const; |
| 122 | 123 |
| 123 // ready state | 124 // ready state |
| 124 enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTUR
E_DATA, HAVE_ENOUGH_DATA }; | 125 enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTUR
E_DATA, HAVE_ENOUGH_DATA }; |
| 125 ReadyState readyState() const; | 126 ReadyState readyState() const; |
| 126 bool seeking() const; | 127 bool seeking() const; |
| 127 | 128 |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 // The load is deferred, and waiting for the task to set the | 501 // The load is deferred, and waiting for the task to set the |
| 501 // delaying-the-load-event flag, after which the load will be executed. | 502 // delaying-the-load-event flag, after which the load will be executed. |
| 502 ExecuteOnStopDelayingLoadEventTask | 503 ExecuteOnStopDelayingLoadEventTask |
| 503 }; | 504 }; |
| 504 DeferredLoadState m_deferredLoadState; | 505 DeferredLoadState m_deferredLoadState; |
| 505 Timer<HTMLMediaElement> m_deferredLoadTimer; | 506 Timer<HTMLMediaElement> m_deferredLoadTimer; |
| 506 | 507 |
| 507 OwnPtr<MediaPlayer> m_player; | 508 OwnPtr<MediaPlayer> m_player; |
| 508 WebLayer* m_webLayer; | 509 WebLayer* m_webLayer; |
| 509 | 510 |
| 510 MediaPlayer::Preload m_preload; | |
| 511 | |
| 512 DisplayMode m_displayMode; | 511 DisplayMode m_displayMode; |
| 513 | 512 |
| 514 RefPtrWillBeMember<HTMLMediaSource> m_mediaSource; | 513 RefPtrWillBeMember<HTMLMediaSource> m_mediaSource; |
| 515 | 514 |
| 516 // Cached time value. Only valid when ready state is HAVE_METADATA or | 515 // Cached time value. Only valid when ready state is HAVE_METADATA or |
| 517 // higher, otherwise the current time is assumed to be zero. | 516 // higher, otherwise the current time is assumed to be zero. |
| 518 mutable double m_cachedTime; | 517 mutable double m_cachedTime; |
| 519 | 518 |
| 520 double m_fragmentEndTime; | 519 double m_fragmentEndTime; |
| 521 | 520 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 inline bool isHTMLMediaElement(const HTMLElement& element) | 578 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 580 { | 579 { |
| 581 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 580 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 582 } | 581 } |
| 583 | 582 |
| 584 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 583 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 585 | 584 |
| 586 } // namespace blink | 585 } // namespace blink |
| 587 | 586 |
| 588 #endif // HTMLMediaElement_h | 587 #endif // HTMLMediaElement_h |
| OLD | NEW |