Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(704)

Side by Side Diff: Source/core/html/HTMLMediaElement.h

Issue 203213008: Move deferred loading logic from WebMediaPlayerClientImpl to HTMLMediaElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing semicolon Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
332 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL; 329 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL;
333 virtual void mediaPlayerSetOpaque(bool) OVERRIDE FINAL; 330 virtual void mediaPlayerSetOpaque(bool) OVERRIDE FINAL;
334 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) OVERRIDE F INAL; 331 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) OVERRIDE F INAL;
335 332
336 void loadTimerFired(Timer<HTMLMediaElement>*); 333 void loadTimerFired(Timer<HTMLMediaElement>*);
337 void progressEventTimerFired(Timer<HTMLMediaElement>*); 334 void progressEventTimerFired(Timer<HTMLMediaElement>*);
338 void playbackProgressTimerFired(Timer<HTMLMediaElement>*); 335 void playbackProgressTimerFired(Timer<HTMLMediaElement>*);
339 void startPlaybackProgressTimer(); 336 void startPlaybackProgressTimer();
340 void startProgressEventTimer(); 337 void startProgressEventTimer();
341 void stopPeriodicTimers(); 338 void stopPeriodicTimers();
342 339
343 void seek(double time, ExceptionState&); 340 void seek(double time, ExceptionState&);
344 void finishSeek(); 341 void finishSeek();
345 void checkIfSeekNeeded(); 342 void checkIfSeekNeeded();
346 void addPlayedRange(double start, double end); 343 void addPlayedRange(double start, double end);
347 344
348 void scheduleTimeupdateEvent(bool periodicEvent); 345 void scheduleTimeupdateEvent(bool periodicEvent);
349 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched uleNamedEvent for clarity. 346 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched uleNamedEvent for clarity.
350 347
351 // loading 348 // loading
352 void prepareForLoad(); 349 void prepareForLoad();
353 void loadInternal(); 350 void loadInternal();
354 void selectMediaResource(); 351 void selectMediaResource();
355 void loadResource(const KURL&, ContentType&, const String& keySystem); 352 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
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
417 Timer<HTMLMediaElement> m_loadTimer; 419 Timer<HTMLMediaElement> m_loadTimer;
418 Timer<HTMLMediaElement> m_progressEventTimer; 420 Timer<HTMLMediaElement> m_progressEventTimer;
419 Timer<HTMLMediaElement> m_playbackProgressTimer; 421 Timer<HTMLMediaElement> m_playbackProgressTimer;
420 RefPtr<TimeRanges> m_playedTimeRanges; 422 RefPtr<TimeRanges> m_playedTimeRanges;
421 OwnPtr<GenericEventQueue> m_asyncEventQueue; 423 OwnPtr<GenericEventQueue> m_asyncEventQueue;
422 424
423 double m_playbackRate; 425 double m_playbackRate;
424 double m_defaultPlaybackRate; 426 double m_defaultPlaybackRate;
425 NetworkState m_networkState; 427 NetworkState m_networkState;
426 ReadyState m_readyState; 428 ReadyState m_readyState;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 487
486 // time has not changed since sending an "ended" event 488 // time has not changed since sending an "ended" event
487 bool m_sentEndEvent : 1; 489 bool m_sentEndEvent : 1;
488 490
489 bool m_pausedInternal : 1; 491 bool m_pausedInternal : 1;
490 492
491 bool m_closedCaptionsVisible : 1; 493 bool m_closedCaptionsVisible : 1;
492 494
493 bool m_completelyLoaded : 1; 495 bool m_completelyLoaded : 1;
494 bool m_havePreparedToPlay : 1; 496 bool m_havePreparedToPlay : 1;
497 bool m_delayingLoadForPreloadNone : 1;
495 498
496 bool m_tracksAreReady : 1; 499 bool m_tracksAreReady : 1;
497 bool m_haveVisibleTextTrack : 1; 500 bool m_haveVisibleTextTrack : 1;
498 bool m_processingPreferenceChange : 1; 501 bool m_processingPreferenceChange : 1;
499 double m_lastTextTrackUpdateTime; 502 double m_lastTextTrackUpdateTime;
500 503
501 RefPtr<TextTrackList> m_textTracks; 504 RefPtr<TextTrackList> m_textTracks;
502 Vector<RefPtr<TextTrack> > m_textTracksWhenResourceSelectionBegan; 505 Vector<RefPtr<TextTrack> > m_textTracksWhenResourceSelectionBegan;
503 506
504 CueIntervalTree m_cueTree; 507 CueIntervalTree m_cueTree;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 inline bool isHTMLMediaElement(const HTMLElement& element) 551 inline bool isHTMLMediaElement(const HTMLElement& element)
549 { 552 {
550 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 553 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
551 } 554 }
552 555
553 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 556 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
554 557
555 } //namespace 558 } //namespace
556 559
557 #endif 560 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698