| 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 void scheduleTimeupdateEvent(bool periodicEvent); | 354 void scheduleTimeupdateEvent(bool periodicEvent); |
| 355 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched
uleNamedEvent for clarity. | 355 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched
uleNamedEvent for clarity. |
| 356 | 356 |
| 357 // loading | 357 // loading |
| 358 void prepareForLoad(); | 358 void prepareForLoad(); |
| 359 void loadInternal(); | 359 void loadInternal(); |
| 360 void selectMediaResource(); | 360 void selectMediaResource(); |
| 361 void loadResource(const KURL&, ContentType&, const String& keySystem); | 361 void loadResource(const KURL&, ContentType&, const String& keySystem); |
| 362 void startPlayerLoad(); | 362 void startPlayerLoad(); |
| 363 void setPlayerPreload(); | 363 void setPlayerPreload(); |
| 364 void startDelayedLoad(); | |
| 365 blink::WebMediaPlayer::LoadType loadType() const; | 364 blink::WebMediaPlayer::LoadType loadType() const; |
| 366 void scheduleNextSourceChild(); | 365 void scheduleNextSourceChild(); |
| 367 void loadNextSourceChild(); | 366 void loadNextSourceChild(); |
| 368 void userCancelledLoad(); | 367 void userCancelledLoad(); |
| 369 void clearMediaPlayer(int flags); | 368 void clearMediaPlayer(int flags); |
| 370 void clearMediaPlayerAndAudioSourceProviderClient(); | 369 void clearMediaPlayerAndAudioSourceProviderClient(); |
| 371 bool havePotentialSourceChild(); | 370 bool havePotentialSourceChild(); |
| 372 void noneSupported(); | 371 void noneSupported(); |
| 373 void mediaEngineError(PassRefPtrWillBeRawPtr<MediaError>); | 372 void mediaEngineError(PassRefPtrWillBeRawPtr<MediaError>); |
| 374 void cancelPendingEventsAndCallbacks(); | 373 void cancelPendingEventsAndCallbacks(); |
| 375 void waitForSourceChange(); | 374 void waitForSourceChange(); |
| 376 void prepareToPlay(); | 375 void prepareToPlay(); |
| 377 | 376 |
| 378 KURL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction
); | 377 KURL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction
); |
| 379 | 378 |
| 380 void mediaLoadingFailed(MediaPlayer::NetworkState); | 379 void mediaLoadingFailed(MediaPlayer::NetworkState); |
| 381 | 380 |
| 381 // deferred loading (preload=none) |
| 382 bool loadIsDeferred() const; |
| 383 void deferredLoad(); |
| 384 void cancelDeferredLoad(); |
| 385 void startDeferredLoad(); |
| 386 void executeDeferredLoad(); |
| 387 void deferredLoadTimerFired(Timer<HTMLMediaElement>*); |
| 388 |
| 382 void updateActiveTextTrackCues(double); | 389 void updateActiveTextTrackCues(double); |
| 383 HTMLTrackElement* showingTrackWithSameKind(HTMLTrackElement*) const; | 390 HTMLTrackElement* showingTrackWithSameKind(HTMLTrackElement*) const; |
| 384 | 391 |
| 385 void markCaptionAndSubtitleTracksAsUnconfigured(); | 392 void markCaptionAndSubtitleTracksAsUnconfigured(); |
| 386 | 393 |
| 387 // This does not check user gesture restrictions. | 394 // This does not check user gesture restrictions. |
| 388 void playInternal(); | 395 void playInternal(); |
| 389 | 396 |
| 390 void allowVideoRendering(); | 397 void allowVideoRendering(); |
| 391 | 398 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 458 |
| 452 // The last time a timeupdate event was sent in movie time. | 459 // The last time a timeupdate event was sent in movie time. |
| 453 double m_lastTimeUpdateEventMovieTime; | 460 double m_lastTimeUpdateEventMovieTime; |
| 454 | 461 |
| 455 // Loading state. | 462 // Loading state. |
| 456 enum LoadState { WaitingForSource, LoadingFromSrcAttr, LoadingFromSourceElem
ent }; | 463 enum LoadState { WaitingForSource, LoadingFromSrcAttr, LoadingFromSourceElem
ent }; |
| 457 LoadState m_loadState; | 464 LoadState m_loadState; |
| 458 RefPtrWillBeMember<HTMLSourceElement> m_currentSourceNode; | 465 RefPtrWillBeMember<HTMLSourceElement> m_currentSourceNode; |
| 459 RefPtrWillBeMember<Node> m_nextChildNodeToConsider; | 466 RefPtrWillBeMember<Node> m_nextChildNodeToConsider; |
| 460 | 467 |
| 468 // "Deferred loading" state (for preload=none). |
| 469 enum DeferredLoadState { |
| 470 // The load is not deferred. |
| 471 NotDeferred, |
| 472 // The load is deferred, and waiting for the task to set the |
| 473 // delaying-the-load-event flag (to false). |
| 474 WaitingForStopDelayingLoadEventTask, |
| 475 // The load is the deferred, and waiting for a triggering event. |
| 476 WaitingForTrigger, |
| 477 // The load is deferred, and waiting for the task to set the |
| 478 // delaying-the-load-event flag, after which the load will be executed. |
| 479 ExecuteOnStopDelayingLoadEventTask |
| 480 }; |
| 481 DeferredLoadState m_deferredLoadState; |
| 482 Timer<HTMLMediaElement> m_deferredLoadTimer; |
| 483 |
| 461 OwnPtr<MediaPlayer> m_player; | 484 OwnPtr<MediaPlayer> m_player; |
| 462 blink::WebLayer* m_webLayer; | 485 blink::WebLayer* m_webLayer; |
| 463 | 486 |
| 464 MediaPlayer::Preload m_preload; | 487 MediaPlayer::Preload m_preload; |
| 465 | 488 |
| 466 DisplayMode m_displayMode; | 489 DisplayMode m_displayMode; |
| 467 | 490 |
| 468 RefPtr<HTMLMediaSource> m_mediaSource; | 491 RefPtr<HTMLMediaSource> m_mediaSource; |
| 469 | 492 |
| 470 mutable double m_cachedTime; | 493 mutable double m_cachedTime; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 inline bool isHTMLMediaElement(const HTMLElement& element) | 582 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 560 { | 583 { |
| 561 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 584 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 562 } | 585 } |
| 563 | 586 |
| 564 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 587 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 565 | 588 |
| 566 } //namespace | 589 } //namespace |
| 567 | 590 |
| 568 #endif | 591 #endif |
| OLD | NEW |