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

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

Issue 185363002: Count how often a Media Fragments URI is applied in HTMLMediaElement (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
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | 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 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 m_previousProgressTime = WTF::currentTime(); 2396 m_previousProgressTime = WTF::currentTime();
2397 m_playbackProgressTimer.startRepeating(maxTimeupdateEventFrequency); 2397 m_playbackProgressTimer.startRepeating(maxTimeupdateEventFrequency);
2398 } 2398 }
2399 2399
2400 void HTMLMediaElement::playbackProgressTimerFired(Timer<HTMLMediaElement>*) 2400 void HTMLMediaElement::playbackProgressTimerFired(Timer<HTMLMediaElement>*)
2401 { 2401 {
2402 ASSERT(m_player); 2402 ASSERT(m_player);
2403 2403
2404 if (m_fragmentEndTime != MediaPlayer::invalidTime() && currentTime() >= m_fr agmentEndTime && m_playbackRate > 0) { 2404 if (m_fragmentEndTime != MediaPlayer::invalidTime() && currentTime() >= m_fr agmentEndTime && m_playbackRate > 0) {
2405 m_fragmentEndTime = MediaPlayer::invalidTime(); 2405 m_fragmentEndTime = MediaPlayer::invalidTime();
2406 if (!m_mediaController && !m_paused) { 2406 if (!m_mediaController && !m_paused) {
acolwell GONE FROM CHROMIUM 2014/03/04 01:22:15 The mediaController portion of this condition seem
philipj_slow 2014/03/04 03:53:20 I hadn't given the controller condition any though
2407 UseCounter::count(document(), UseCounter::HTMLMediaElementPauseAtFra gmentEnd);
2407 // changes paused to true and fires a simple event named pause at th e media element. 2408 // changes paused to true and fires a simple event named pause at th e media element.
2408 pause(); 2409 pause();
2409 } 2410 }
2410 } 2411 }
2411 2412
2412 if (!m_seeking) 2413 if (!m_seeking)
2413 scheduleTimeupdateEvent(true); 2414 scheduleTimeupdateEvent(true);
2414 2415
2415 if (!m_playbackRate) 2416 if (!m_playbackRate)
2416 return; 2417 return;
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
3848 m_fragmentEndTime = MediaPlayer::invalidTime(); 3849 m_fragmentEndTime = MediaPlayer::invalidTime();
3849 3850
3850 if (m_fragmentStartTime != MediaPlayer::invalidTime() && m_readyState < HAVE _FUTURE_DATA) 3851 if (m_fragmentStartTime != MediaPlayer::invalidTime() && m_readyState < HAVE _FUTURE_DATA)
3851 prepareToPlay(); 3852 prepareToPlay();
3852 } 3853 }
3853 3854
3854 void HTMLMediaElement::applyMediaFragmentURI() 3855 void HTMLMediaElement::applyMediaFragmentURI()
3855 { 3856 {
3856 if (m_fragmentStartTime != MediaPlayer::invalidTime()) { 3857 if (m_fragmentStartTime != MediaPlayer::invalidTime()) {
3857 m_sentEndEvent = false; 3858 m_sentEndEvent = false;
3859 UseCounter::count(document(), UseCounter::HTMLMediaElementSeekToFragment Start);
3858 seek(m_fragmentStartTime, IGNORE_EXCEPTION); 3860 seek(m_fragmentStartTime, IGNORE_EXCEPTION);
3859 } 3861 }
3860 } 3862 }
3861 3863
3862 MediaPlayerClient::CORSMode HTMLMediaElement::mediaPlayerCORSMode() const 3864 MediaPlayerClient::CORSMode HTMLMediaElement::mediaPlayerCORSMode() const
3863 { 3865 {
3864 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); 3866 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr);
3865 if (crossOriginMode.isNull()) 3867 if (crossOriginMode.isNull())
3866 return Unspecified; 3868 return Unspecified;
3867 if (equalIgnoringCase(crossOriginMode, "use-credentials")) 3869 if (equalIgnoringCase(crossOriginMode, "use-credentials"))
(...skipping 30 matching lines...) Expand all
3898 { 3900 {
3899 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); 3901 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource));
3900 } 3902 }
3901 3903
3902 bool HTMLMediaElement::isInteractiveContent() const 3904 bool HTMLMediaElement::isInteractiveContent() const
3903 { 3905 {
3904 return fastHasAttribute(controlsAttr); 3906 return fastHasAttribute(controlsAttr);
3905 } 3907 }
3906 3908
3907 } 3909 }
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698