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

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

Issue 192013002: Move deferred loading logic from WebMediaPlayerClientImpl to HTMLMediaElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Clean up unnecessary logic and state. 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
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 virtual void mediaPlayerNetworkStateChanged() OVERRIDE FINAL; 319 virtual void mediaPlayerNetworkStateChanged() OVERRIDE FINAL;
320 virtual void mediaPlayerReadyStateChanged() OVERRIDE FINAL; 320 virtual void mediaPlayerReadyStateChanged() OVERRIDE FINAL;
321 virtual void mediaPlayerTimeChanged() OVERRIDE FINAL; 321 virtual void mediaPlayerTimeChanged() OVERRIDE FINAL;
322 virtual void mediaPlayerDurationChanged() OVERRIDE FINAL; 322 virtual void mediaPlayerDurationChanged() OVERRIDE FINAL;
323 virtual void mediaPlayerPlaybackStateChanged() OVERRIDE FINAL; 323 virtual void mediaPlayerPlaybackStateChanged() OVERRIDE FINAL;
324 virtual void mediaPlayerRequestFullscreen() OVERRIDE FINAL; 324 virtual void mediaPlayerRequestFullscreen() OVERRIDE FINAL;
325 virtual void mediaPlayerRequestSeek(double) OVERRIDE FINAL; 325 virtual void mediaPlayerRequestSeek(double) OVERRIDE FINAL;
326 virtual void mediaPlayerRepaint() OVERRIDE FINAL; 326 virtual void mediaPlayerRepaint() OVERRIDE FINAL;
327 virtual void mediaPlayerSizeChanged() OVERRIDE FINAL; 327 virtual void mediaPlayerSizeChanged() OVERRIDE FINAL;
328
329 virtual CORSMode mediaPlayerCORSMode() const OVERRIDE FINAL;
330
331 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL; 328 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL;
332 virtual void mediaPlayerSetOpaque(bool) OVERRIDE FINAL; 329 virtual void mediaPlayerSetOpaque(bool) OVERRIDE FINAL;
333 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) OVERRIDE F INAL; 330 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) OVERRIDE F INAL;
334 331
335 void loadTimerFired(Timer<HTMLMediaElement>*); 332 void loadTimerFired(Timer<HTMLMediaElement>*);
336 void progressEventTimerFired(Timer<HTMLMediaElement>*); 333 void progressEventTimerFired(Timer<HTMLMediaElement>*);
337 void playbackProgressTimerFired(Timer<HTMLMediaElement>*); 334 void playbackProgressTimerFired(Timer<HTMLMediaElement>*);
338 void startPlaybackProgressTimer(); 335 void startPlaybackProgressTimer();
339 void startProgressEventTimer(); 336 void startProgressEventTimer();
340 void stopPeriodicTimers(); 337 void stopPeriodicTimers();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 403
407 void changeNetworkStateFromLoadingToIdle(); 404 void changeNetworkStateFromLoadingToIdle();
408 405
409 const AtomicString& mediaGroup() const; 406 const AtomicString& mediaGroup() const;
410 void setMediaGroup(const AtomicString&); 407 void setMediaGroup(const AtomicString&);
411 void updateMediaController(); 408 void updateMediaController();
412 bool isBlocked() const; 409 bool isBlocked() const;
413 bool isBlockedOnMediaController() const; 410 bool isBlockedOnMediaController() const;
414 bool isAutoplaying() const { return m_autoplaying; } 411 bool isAutoplaying() const { return m_autoplaying; }
415 412
413 blink::WebMediaPlayer::CORSMode corsMode() const;
414
415 void setPlayerPreload();
416 void startDelayedLoad();
417 blink::WebMediaPlayer::LoadType loadType() const;
418
416 Timer<HTMLMediaElement> m_loadTimer; 419 Timer<HTMLMediaElement> m_loadTimer;
417 Timer<HTMLMediaElement> m_progressEventTimer; 420 Timer<HTMLMediaElement> m_progressEventTimer;
418 Timer<HTMLMediaElement> m_playbackProgressTimer; 421 Timer<HTMLMediaElement> m_playbackProgressTimer;
419 RefPtr<TimeRanges> m_playedTimeRanges; 422 RefPtr<TimeRanges> m_playedTimeRanges;
420 OwnPtr<GenericEventQueue> m_asyncEventQueue; 423 OwnPtr<GenericEventQueue> m_asyncEventQueue;
421 424
422 double m_playbackRate; 425 double m_playbackRate;
423 double m_defaultPlaybackRate; 426 double m_defaultPlaybackRate;
424 NetworkState m_networkState; 427 NetworkState m_networkState;
425 ReadyState m_readyState; 428 ReadyState m_readyState;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 double m_lastTextTrackUpdateTime; 501 double m_lastTextTrackUpdateTime;
499 502
500 RefPtr<TextTrackList> m_textTracks; 503 RefPtr<TextTrackList> m_textTracks;
501 Vector<RefPtr<TextTrack> > m_textTracksWhenResourceSelectionBegan; 504 Vector<RefPtr<TextTrack> > m_textTracksWhenResourceSelectionBegan;
502 505
503 CueIntervalTree m_cueTree; 506 CueIntervalTree m_cueTree;
504 507
505 CueList m_currentlyActiveCues; 508 CueList m_currentlyActiveCues;
506 int m_ignoreTrackDisplayUpdate; 509 int m_ignoreTrackDisplayUpdate;
507 510
511 bool m_delayingLoad;
philipj_slow 2014/03/08 19:38:40 Merge this with the bitfield above and it becomes
acolwell GONE FROM CHROMIUM 2014/03/10 21:53:31 Done.
512
508 #if ENABLE(WEB_AUDIO) 513 #if ENABLE(WEB_AUDIO)
509 // This is a weak reference, since m_audioSourceNode holds a reference to us . 514 // This is a weak reference, since m_audioSourceNode holds a reference to us .
510 // The value is set just after the MediaElementAudioSourceNode is created. 515 // The value is set just after the MediaElementAudioSourceNode is created.
511 // The value is cleared in MediaElementAudioSourceNode::~MediaElementAudioSo urceNode(). 516 // The value is cleared in MediaElementAudioSourceNode::~MediaElementAudioSo urceNode().
512 MediaElementAudioSourceNode* m_audioSourceNode; 517 MediaElementAudioSourceNode* m_audioSourceNode;
513 #endif 518 #endif
514 519
515 friend class MediaController; 520 friend class MediaController;
516 RefPtr<MediaController> m_mediaController; 521 RefPtr<MediaController> m_mediaController;
517 522
(...skipping 24 matching lines...) Expand all
542 inline bool isHTMLMediaElement(const Node& node) 547 inline bool isHTMLMediaElement(const Node& node)
543 { 548 {
544 return node.isElementNode() && toElement(node).isMediaElement(); 549 return node.isElementNode() && toElement(node).isMediaElement();
545 } 550 }
546 551
547 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 552 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
548 553
549 } //namespace 554 } //namespace
550 555
551 #endif 556 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | Source/core/html/HTMLMediaElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698