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

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

Issue 188853002: Remove MediaControls::bufferingProgressed() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 if (state == MediaPlayer::Loaded) { 1530 if (state == MediaPlayer::Loaded) {
1531 if (m_networkState != NETWORK_IDLE) 1531 if (m_networkState != NETWORK_IDLE)
1532 changeNetworkStateFromLoadingToIdle(); 1532 changeNetworkStateFromLoadingToIdle();
1533 m_completelyLoaded = true; 1533 m_completelyLoaded = true;
1534 } 1534 }
1535 } 1535 }
1536 1536
1537 void HTMLMediaElement::changeNetworkStateFromLoadingToIdle() 1537 void HTMLMediaElement::changeNetworkStateFromLoadingToIdle()
1538 { 1538 {
1539 m_progressEventTimer.stop(); 1539 m_progressEventTimer.stop();
1540 if (hasMediaControls() && m_player->didLoadingProgress())
1541 mediaControls()->bufferingProgressed();
1542 1540
1543 // Schedule one last progress event so we guarantee that at least one is fir ed 1541 // Schedule one last progress event so we guarantee that at least one is fir ed
1544 // for files that load very quickly. 1542 // for files that load very quickly.
1545 scheduleEvent(EventTypeNames::progress); 1543 scheduleEvent(EventTypeNames::progress);
1546 scheduleEvent(EventTypeNames::suspend); 1544 scheduleEvent(EventTypeNames::suspend);
1547 m_networkState = NETWORK_IDLE; 1545 m_networkState = NETWORK_IDLE;
1548 } 1546 }
1549 1547
1550 void HTMLMediaElement::mediaPlayerReadyStateChanged() 1548 void HTMLMediaElement::mediaPlayerReadyStateChanged()
1551 { 1549 {
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1832 1830
1833 double time = WTF::currentTime(); 1831 double time = WTF::currentTime();
1834 double timedelta = time - m_previousProgressTime; 1832 double timedelta = time - m_previousProgressTime;
1835 1833
1836 if (m_player->didLoadingProgress()) { 1834 if (m_player->didLoadingProgress()) {
1837 scheduleEvent(EventTypeNames::progress); 1835 scheduleEvent(EventTypeNames::progress);
1838 m_previousProgressTime = time; 1836 m_previousProgressTime = time;
1839 m_sentStalledEvent = false; 1837 m_sentStalledEvent = false;
1840 if (renderer()) 1838 if (renderer())
1841 renderer()->updateFromElement(); 1839 renderer()->updateFromElement();
1842 if (hasMediaControls())
1843 mediaControls()->bufferingProgressed();
1844 } else if (timedelta > 3.0 && !m_sentStalledEvent) { 1840 } else if (timedelta > 3.0 && !m_sentStalledEvent) {
1845 scheduleEvent(EventTypeNames::stalled); 1841 scheduleEvent(EventTypeNames::stalled);
1846 m_sentStalledEvent = true; 1842 m_sentStalledEvent = true;
1847 setShouldDelayLoadEvent(false); 1843 setShouldDelayLoadEvent(false);
1848 } 1844 }
1849 } 1845 }
1850 1846
1851 void HTMLMediaElement::addPlayedRange(double start, double end) 1847 void HTMLMediaElement::addPlayedRange(double start, double end)
1852 { 1848 {
1853 WTF_LOG(Media, "HTMLMediaElement::addPlayedRange(%f, %f)", start, end); 1849 WTF_LOG(Media, "HTMLMediaElement::addPlayedRange(%f, %f)", start, end);
(...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after
3929 { 3925 {
3930 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); 3926 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource));
3931 } 3927 }
3932 3928
3933 bool HTMLMediaElement::isInteractiveContent() const 3929 bool HTMLMediaElement::isInteractiveContent() const
3934 { 3930 {
3935 return fastHasAttribute(controlsAttr); 3931 return fastHasAttribute(controlsAttr);
3936 } 3932 }
3937 3933
3938 } 3934 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/shadow/MediaControls.h » ('j') | Source/core/html/shadow/MediaControls.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698