Chromium Code Reviews| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 bool hasAudio() const; | 90 bool hasAudio() const; |
| 91 | 91 |
| 92 bool supportsSave() const; | 92 bool supportsSave() const; |
| 93 | 93 |
| 94 WebLayer* platformLayer() const; | 94 WebLayer* platformLayer() const; |
| 95 | 95 |
| 96 enum DelayedActionType { | 96 enum DelayedActionType { |
| 97 LoadMediaResource = 1 << 0, | 97 LoadMediaResource = 1 << 0, |
| 98 LoadTextTrackResource = 1 << 1 | 98 LoadTextTrackResource = 1 << 1 |
| 99 }; | 99 }; |
| 100 void scheduleDelayedAction(DelayedActionType); | 100 void scheduleTextTrackResourceLoad(); |
| 101 | 101 |
| 102 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; } | 102 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; } |
| 103 bool isPlayingRemotely() const { return m_playingRemotely; } | 103 bool isPlayingRemotely() const { return m_playingRemotely; } |
| 104 | 104 |
| 105 // error state | 105 // error state |
| 106 MediaError* error() const; | 106 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; } |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 338 void stopPeriodicTimers(); | 338 void stopPeriodicTimers(); |
| 339 | 339 |
| 340 void seek(double time); | 340 void seek(double time); |
| 341 void finishSeek(); | 341 void finishSeek(); |
| 342 void checkIfSeekNeeded(); | 342 void checkIfSeekNeeded(); |
| 343 void addPlayedRange(double start, double end); | 343 void addPlayedRange(double start, double end); |
| 344 | 344 |
| 345 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched uleNamedEvent for clarity. | 345 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched uleNamedEvent for clarity. |
| 346 | 346 |
| 347 // loading | 347 // loading |
| 348 void invokeLoadAlgorithm(); | |
| 348 void prepareForLoad(); | 349 void prepareForLoad(); |
| 350 void invokeResourceSelectionAlgorithm(); | |
| 349 void loadInternal(); | 351 void loadInternal(); |
| 350 void selectMediaResource(); | 352 void selectMediaResource(); |
| 351 void loadResource(const KURL&, ContentType&); | 353 void loadResource(const KURL&, ContentType&); |
| 352 void startPlayerLoad(); | 354 void startPlayerLoad(); |
| 353 void setPlayerPreload(); | 355 void setPlayerPreload(); |
| 354 WebMediaPlayer::LoadType loadType() const; | 356 WebMediaPlayer::LoadType loadType() const; |
| 355 void scheduleNextSourceChild(); | 357 void scheduleNextSourceChild(); |
| 356 void loadNextSourceChild(); | 358 void loadNextSourceChild(); |
| 357 void clearMediaPlayer(int flags); | 359 void clearMediaPlayer(int flags); |
| 358 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); | 360 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); |
| 359 bool havePotentialSourceChild(); | 361 bool havePotentialSourceChild(); |
| 360 void noneSupported(); | 362 void noneSupported(); |
| 361 void mediaEngineError(MediaError*); | 363 void mediaEngineError(MediaError*); |
| 362 void cancelPendingEventsAndCallbacks(); | 364 void cancelPendingEventsAndCallbacks(); |
| 363 void waitForSourceChange(); | 365 void waitForSourceChange(); |
| 364 void prepareToPlay(); | |
| 365 | 366 |
| 366 KURL selectNextSourceChild(ContentType*, InvalidURLAction); | 367 KURL selectNextSourceChild(ContentType*, InvalidURLAction); |
| 367 | 368 |
| 368 void mediaLoadingFailed(WebMediaPlayer::NetworkState); | 369 void mediaLoadingFailed(WebMediaPlayer::NetworkState); |
| 369 | 370 |
| 370 // deferred loading (preload=none) | 371 // deferred loading (preload=none) |
| 371 bool loadIsDeferred() const; | 372 bool loadIsDeferred() const; |
| 372 void deferLoad(); | 373 void deferLoad(); |
| 373 void cancelDeferredLoad(); | 374 void cancelDeferredLoad(); |
| 374 void startDeferredLoad(); | 375 void startDeferredLoad(); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 545 bool m_seeking : 1; | 546 bool m_seeking : 1; |
| 546 | 547 |
| 547 // data has not been loaded since sending a "stalled" event | 548 // data has not been loaded since sending a "stalled" event |
| 548 bool m_sentStalledEvent : 1; | 549 bool m_sentStalledEvent : 1; |
| 549 | 550 |
| 550 // time has not changed since sending an "ended" event | 551 // time has not changed since sending an "ended" event |
| 551 bool m_sentEndEvent : 1; | 552 bool m_sentEndEvent : 1; |
| 552 | 553 |
| 553 bool m_closedCaptionsVisible : 1; | 554 bool m_closedCaptionsVisible : 1; |
| 554 | 555 |
| 555 bool m_havePreparedToPlay : 1; | 556 bool m_ignorePreloadNone : 1; |
|
philipj_slow
2016/03/09 09:16:00
m_forceEffectivePreloadAuto might be a more descri
Srirama
2016/03/09 12:26:22
Done.
| |
| 556 | |
| 557 bool m_tracksAreReady : 1; | 557 bool m_tracksAreReady : 1; |
| 558 bool m_processingPreferenceChange : 1; | 558 bool m_processingPreferenceChange : 1; |
| 559 bool m_remoteRoutesAvailable : 1; | 559 bool m_remoteRoutesAvailable : 1; |
| 560 bool m_playingRemotely : 1; | 560 bool m_playingRemotely : 1; |
| 561 bool m_isFinalizing : 1; | 561 bool m_isFinalizing : 1; |
| 562 bool m_initialPlayWithoutUserGesture : 1; | 562 bool m_initialPlayWithoutUserGesture : 1; |
| 563 bool m_autoplayMediaCounted : 1; | 563 bool m_autoplayMediaCounted : 1; |
| 564 // Whether this element is in overlay fullscreen mode. | 564 // Whether this element is in overlay fullscreen mode. |
| 565 bool m_inOverlayFullscreenVideo : 1; | 565 bool m_inOverlayFullscreenVideo : 1; |
| 566 | 566 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 643 inline bool isHTMLMediaElement(const HTMLElement& element) | 643 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 644 { | 644 { |
| 645 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 645 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 646 } | 646 } |
| 647 | 647 |
| 648 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 648 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 649 | 649 |
| 650 } // namespace blink | 650 } // namespace blink |
| 651 | 651 |
| 652 #endif // HTMLMediaElement_h | 652 #endif // HTMLMediaElement_h |
| OLD | NEW |