| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 void addTextTrack(WebInbandTextTrack*) final; | 352 void addTextTrack(WebInbandTextTrack*) final; |
| 353 void removeTextTrack(WebInbandTextTrack*) final; | 353 void removeTextTrack(WebInbandTextTrack*) final; |
| 354 void mediaSourceOpened(WebMediaSource*) final; | 354 void mediaSourceOpened(WebMediaSource*) final; |
| 355 void requestSeek(double) final; | 355 void requestSeek(double) final; |
| 356 void remoteRouteAvailabilityChanged(bool) final; | 356 void remoteRouteAvailabilityChanged(bool) final; |
| 357 void connectedToRemoteDevice() final; | 357 void connectedToRemoteDevice() final; |
| 358 void disconnectedFromRemoteDevice() final; | 358 void disconnectedFromRemoteDevice() final; |
| 359 void cancelledRemotePlaybackRequest() final; | 359 void cancelledRemotePlaybackRequest() final; |
| 360 void requestReload(const WebURL&) final; | 360 void requestReload(const WebURL&) final; |
| 361 | 361 |
| 362 void loadTimerFired(Timer<HTMLMediaElement>*); | 362 void loadTimerFired(TimerBase*); |
| 363 void progressEventTimerFired(Timer<HTMLMediaElement>*); | 363 void progressEventTimerFired(TimerBase*); |
| 364 void playbackProgressTimerFired(Timer<HTMLMediaElement>*); | 364 void playbackProgressTimerFired(TimerBase*); |
| 365 void startPlaybackProgressTimer(); | 365 void startPlaybackProgressTimer(); |
| 366 void startProgressEventTimer(); | 366 void startProgressEventTimer(); |
| 367 void stopPeriodicTimers(); | 367 void stopPeriodicTimers(); |
| 368 | 368 |
| 369 void seek(double time); | 369 void seek(double time); |
| 370 void finishSeek(); | 370 void finishSeek(); |
| 371 void checkIfSeekNeeded(); | 371 void checkIfSeekNeeded(); |
| 372 void addPlayedRange(double start, double end); | 372 void addPlayedRange(double start, double end); |
| 373 | 373 |
| 374 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched
uleNamedEvent for clarity. | 374 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched
uleNamedEvent for clarity. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 398 KURL selectNextSourceChild(ContentType*, InvalidURLAction); | 398 KURL selectNextSourceChild(ContentType*, InvalidURLAction); |
| 399 | 399 |
| 400 void mediaLoadingFailed(WebMediaPlayer::NetworkState); | 400 void mediaLoadingFailed(WebMediaPlayer::NetworkState); |
| 401 | 401 |
| 402 // deferred loading (preload=none) | 402 // deferred loading (preload=none) |
| 403 bool loadIsDeferred() const; | 403 bool loadIsDeferred() const; |
| 404 void deferLoad(); | 404 void deferLoad(); |
| 405 void cancelDeferredLoad(); | 405 void cancelDeferredLoad(); |
| 406 void startDeferredLoad(); | 406 void startDeferredLoad(); |
| 407 void executeDeferredLoad(); | 407 void executeDeferredLoad(); |
| 408 void deferredLoadTimerFired(Timer<HTMLMediaElement>*); | 408 void deferredLoadTimerFired(TimerBase*); |
| 409 | 409 |
| 410 void markCaptionAndSubtitleTracksAsUnconfigured(); | 410 void markCaptionAndSubtitleTracksAsUnconfigured(); |
| 411 | 411 |
| 412 // This does not check user gesture restrictions. | 412 // This does not check user gesture restrictions. |
| 413 void playInternal(); | 413 void playInternal(); |
| 414 | 414 |
| 415 // This does not change the buffering strategy. | 415 // This does not change the buffering strategy. |
| 416 void pauseInternal(); | 416 void pauseInternal(); |
| 417 | 417 |
| 418 void allowVideoRendering(); | 418 void allowVideoRendering(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // the requirement is currently overridden. This does not check if a user | 478 // the requirement is currently overridden. This does not check if a user |
| 479 // gesture is currently being processed. | 479 // gesture is currently being processed. |
| 480 bool isGestureNeededForPlayback() const; | 480 bool isGestureNeededForPlayback() const; |
| 481 | 481 |
| 482 // Return true if and only if the settings allow autoplay of media on this | 482 // Return true if and only if the settings allow autoplay of media on this |
| 483 // frame. | 483 // frame. |
| 484 bool isAutoplayAllowedPerSettings() const; | 484 bool isAutoplayAllowedPerSettings() const; |
| 485 | 485 |
| 486 void setNetworkState(NetworkState); | 486 void setNetworkState(NetworkState); |
| 487 | 487 |
| 488 void audioTracksTimerFired(Timer<HTMLMediaElement>*); | 488 void audioTracksTimerFired(TimerBase*); |
| 489 | 489 |
| 490 // TODO(liberato): remove once autoplay gesture override experiment conclude
s. | 490 // TODO(liberato): remove once autoplay gesture override experiment conclude
s. |
| 491 void triggerAutoplayViewportCheckForTesting(); | 491 void triggerAutoplayViewportCheckForTesting(); |
| 492 | 492 |
| 493 void scheduleResolvePlayPromises(); | 493 void scheduleResolvePlayPromises(); |
| 494 void scheduleRejectPlayPromises(ExceptionCode); | 494 void scheduleRejectPlayPromises(ExceptionCode); |
| 495 void scheduleNotifyPlaying(); | 495 void scheduleNotifyPlaying(); |
| 496 void resolveScheduledPlayPromises(); | 496 void resolveScheduledPlayPromises(); |
| 497 void rejectScheduledPlayPromises(); | 497 void rejectScheduledPlayPromises(); |
| 498 void rejectPlayPromises(ExceptionCode, const String&); | 498 void rejectPlayPromises(ExceptionCode, const String&); |
| 499 void rejectPlayPromisesInternal(ExceptionCode, const String&); | 499 void rejectPlayPromisesInternal(ExceptionCode, const String&); |
| 500 | 500 |
| 501 EnumerationHistogram& showControlsHistogram() const; | 501 EnumerationHistogram& showControlsHistogram() const; |
| 502 | 502 |
| 503 void recordAutoplaySourceMetric(int source); | 503 void recordAutoplaySourceMetric(int source); |
| 504 void recordAutoplayUnmuteStatus(AutoplayUnmuteActionStatus); | 504 void recordAutoplayUnmuteStatus(AutoplayUnmuteActionStatus); |
| 505 | 505 |
| 506 // ElementVisibilityObserver::Client implementation | 506 // ElementVisibilityObserver::Client implementation |
| 507 void onVisibilityChanged(bool isVisible) override; | 507 void onVisibilityChanged(bool isVisible) override; |
| 508 ExecutionContext* getElementVisibilityExecutionContext() const override { re
turn getExecutionContext(); } | 508 ExecutionContext* getElementVisibilityExecutionContext() const override { re
turn getExecutionContext(); } |
| 509 | 509 |
| 510 UnthrottledTimer<HTMLMediaElement> m_loadTimer; | 510 UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer; |
| 511 UnthrottledTimer<HTMLMediaElement> m_progressEventTimer; | 511 UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer; |
| 512 UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer; | 512 UnthrottledThreadTimer<HTMLMediaElement> m_playbackProgressTimer; |
| 513 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer; | 513 UnthrottledThreadTimer<HTMLMediaElement> m_audioTracksTimer; |
| 514 Member<TimeRanges> m_playedTimeRanges; | 514 Member<TimeRanges> m_playedTimeRanges; |
| 515 Member<GenericEventQueue> m_asyncEventQueue; | 515 Member<GenericEventQueue> m_asyncEventQueue; |
| 516 | 516 |
| 517 double m_playbackRate; | 517 double m_playbackRate; |
| 518 double m_defaultPlaybackRate; | 518 double m_defaultPlaybackRate; |
| 519 NetworkState m_networkState; | 519 NetworkState m_networkState; |
| 520 ReadyState m_readyState; | 520 ReadyState m_readyState; |
| 521 ReadyState m_readyStateMaximum; | 521 ReadyState m_readyStateMaximum; |
| 522 KURL m_currentSrc; | 522 KURL m_currentSrc; |
| 523 Member<MediaStreamDescriptor> m_srcObject; | 523 Member<MediaStreamDescriptor> m_srcObject; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 inline bool isHTMLMediaElement(const HTMLElement& element) | 693 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 694 { | 694 { |
| 695 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 695 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 696 } | 696 } |
| 697 | 697 |
| 698 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 698 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 699 | 699 |
| 700 } // namespace blink | 700 } // namespace blink |
| 701 | 701 |
| 702 #endif // HTMLMediaElement_h | 702 #endif // HTMLMediaElement_h |
| OLD | NEW |