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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 319 |
320 virtual void mediaPlayerNetworkStateChanged() OVERRIDE FINAL; | 320 virtual void mediaPlayerNetworkStateChanged() OVERRIDE FINAL; |
321 virtual void mediaPlayerReadyStateChanged() OVERRIDE FINAL; | 321 virtual void mediaPlayerReadyStateChanged() OVERRIDE FINAL; |
322 virtual void mediaPlayerTimeChanged() OVERRIDE FINAL; | 322 virtual void mediaPlayerTimeChanged() OVERRIDE FINAL; |
323 virtual void mediaPlayerDurationChanged() OVERRIDE FINAL; | 323 virtual void mediaPlayerDurationChanged() OVERRIDE FINAL; |
324 virtual void mediaPlayerPlaybackStateChanged() OVERRIDE FINAL; | 324 virtual void mediaPlayerPlaybackStateChanged() OVERRIDE FINAL; |
325 virtual void mediaPlayerRequestFullscreen() OVERRIDE FINAL; | 325 virtual void mediaPlayerRequestFullscreen() OVERRIDE FINAL; |
326 virtual void mediaPlayerRequestSeek(double) OVERRIDE FINAL; | 326 virtual void mediaPlayerRequestSeek(double) OVERRIDE FINAL; |
327 virtual void mediaPlayerRepaint() OVERRIDE FINAL; | 327 virtual void mediaPlayerRepaint() OVERRIDE FINAL; |
328 virtual void mediaPlayerSizeChanged() OVERRIDE FINAL; | 328 virtual void mediaPlayerSizeChanged() OVERRIDE FINAL; |
| 329 |
| 330 virtual CORSMode mediaPlayerCORSMode() const OVERRIDE FINAL; |
| 331 |
329 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL; | 332 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL; |
330 virtual void mediaPlayerSetOpaque(bool) OVERRIDE FINAL; | 333 virtual void mediaPlayerSetOpaque(bool) OVERRIDE FINAL; |
331 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) OVERRIDE F
INAL; | 334 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) OVERRIDE F
INAL; |
332 | 335 |
333 void loadTimerFired(Timer<HTMLMediaElement>*); | 336 void loadTimerFired(Timer<HTMLMediaElement>*); |
334 void progressEventTimerFired(Timer<HTMLMediaElement>*); | 337 void progressEventTimerFired(Timer<HTMLMediaElement>*); |
335 void playbackProgressTimerFired(Timer<HTMLMediaElement>*); | 338 void playbackProgressTimerFired(Timer<HTMLMediaElement>*); |
336 void startPlaybackProgressTimer(); | 339 void startPlaybackProgressTimer(); |
337 void startProgressEventTimer(); | 340 void startProgressEventTimer(); |
338 void stopPeriodicTimers(); | 341 void stopPeriodicTimers(); |
339 | 342 |
340 void seek(double time, ExceptionState&); | 343 void seek(double time, ExceptionState&); |
341 void finishSeek(); | 344 void finishSeek(); |
342 void checkIfSeekNeeded(); | 345 void checkIfSeekNeeded(); |
343 void addPlayedRange(double start, double end); | 346 void addPlayedRange(double start, double end); |
344 | 347 |
345 void scheduleTimeupdateEvent(bool periodicEvent); | 348 void scheduleTimeupdateEvent(bool periodicEvent); |
346 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched
uleNamedEvent for clarity. | 349 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched
uleNamedEvent for clarity. |
347 | 350 |
348 // loading | 351 // loading |
349 void prepareForLoad(); | 352 void prepareForLoad(); |
350 void loadInternal(); | 353 void loadInternal(); |
351 void selectMediaResource(); | 354 void selectMediaResource(); |
352 void loadResource(const KURL&, ContentType&, const String& keySystem); | 355 void loadResource(const KURL&, ContentType&, const String& keySystem); |
353 void setPlayerPreload(); | |
354 void startDelayedLoad(); | |
355 blink::WebMediaPlayer::LoadType loadType() const; | |
356 void scheduleNextSourceChild(); | 356 void scheduleNextSourceChild(); |
357 void loadNextSourceChild(); | 357 void loadNextSourceChild(); |
358 void userCancelledLoad(); | 358 void userCancelledLoad(); |
359 void clearMediaPlayer(int flags); | 359 void clearMediaPlayer(int flags); |
360 void clearMediaPlayerAndAudioSourceProviderClient(); | 360 void clearMediaPlayerAndAudioSourceProviderClient(); |
361 bool havePotentialSourceChild(); | 361 bool havePotentialSourceChild(); |
362 void noneSupported(); | 362 void noneSupported(); |
363 void mediaEngineError(PassRefPtr<MediaError> err); | 363 void mediaEngineError(PassRefPtr<MediaError> err); |
364 void cancelPendingEventsAndCallbacks(); | 364 void cancelPendingEventsAndCallbacks(); |
365 void waitForSourceChange(); | 365 void waitForSourceChange(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 407 |
408 void changeNetworkStateFromLoadingToIdle(); | 408 void changeNetworkStateFromLoadingToIdle(); |
409 | 409 |
410 const AtomicString& mediaGroup() const; | 410 const AtomicString& mediaGroup() const; |
411 void setMediaGroup(const AtomicString&); | 411 void setMediaGroup(const AtomicString&); |
412 void updateMediaController(); | 412 void updateMediaController(); |
413 bool isBlocked() const; | 413 bool isBlocked() const; |
414 bool isBlockedOnMediaController() const; | 414 bool isBlockedOnMediaController() const; |
415 bool isAutoplaying() const { return m_autoplaying; } | 415 bool isAutoplaying() const { return m_autoplaying; } |
416 | 416 |
417 blink::WebMediaPlayer::CORSMode corsMode() const; | |
418 | |
419 Timer<HTMLMediaElement> m_loadTimer; | 417 Timer<HTMLMediaElement> m_loadTimer; |
420 Timer<HTMLMediaElement> m_progressEventTimer; | 418 Timer<HTMLMediaElement> m_progressEventTimer; |
421 Timer<HTMLMediaElement> m_playbackProgressTimer; | 419 Timer<HTMLMediaElement> m_playbackProgressTimer; |
422 RefPtr<TimeRanges> m_playedTimeRanges; | 420 RefPtr<TimeRanges> m_playedTimeRanges; |
423 OwnPtr<GenericEventQueue> m_asyncEventQueue; | 421 OwnPtr<GenericEventQueue> m_asyncEventQueue; |
424 | 422 |
425 double m_playbackRate; | 423 double m_playbackRate; |
426 double m_defaultPlaybackRate; | 424 double m_defaultPlaybackRate; |
427 NetworkState m_networkState; | 425 NetworkState m_networkState; |
428 ReadyState m_readyState; | 426 ReadyState m_readyState; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 | 485 |
488 // time has not changed since sending an "ended" event | 486 // time has not changed since sending an "ended" event |
489 bool m_sentEndEvent : 1; | 487 bool m_sentEndEvent : 1; |
490 | 488 |
491 bool m_pausedInternal : 1; | 489 bool m_pausedInternal : 1; |
492 | 490 |
493 bool m_closedCaptionsVisible : 1; | 491 bool m_closedCaptionsVisible : 1; |
494 | 492 |
495 bool m_completelyLoaded : 1; | 493 bool m_completelyLoaded : 1; |
496 bool m_havePreparedToPlay : 1; | 494 bool m_havePreparedToPlay : 1; |
497 bool m_delayingLoadForPreloadNone : 1; | |
498 | 495 |
499 bool m_tracksAreReady : 1; | 496 bool m_tracksAreReady : 1; |
500 bool m_haveVisibleTextTrack : 1; | 497 bool m_haveVisibleTextTrack : 1; |
501 bool m_processingPreferenceChange : 1; | 498 bool m_processingPreferenceChange : 1; |
502 double m_lastTextTrackUpdateTime; | 499 double m_lastTextTrackUpdateTime; |
503 | 500 |
504 RefPtr<TextTrackList> m_textTracks; | 501 RefPtr<TextTrackList> m_textTracks; |
505 Vector<RefPtr<TextTrack> > m_textTracksWhenResourceSelectionBegan; | 502 Vector<RefPtr<TextTrack> > m_textTracksWhenResourceSelectionBegan; |
506 | 503 |
507 CueIntervalTree m_cueTree; | 504 CueIntervalTree m_cueTree; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 inline bool isHTMLMediaElement(const HTMLElement& element) | 548 inline bool isHTMLMediaElement(const HTMLElement& element) |
552 { | 549 { |
553 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 550 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
554 } | 551 } |
555 | 552 |
556 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 553 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
557 | 554 |
558 } //namespace | 555 } //namespace |
559 | 556 |
560 #endif | 557 #endif |
OLD | NEW |