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

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

Issue 1415683009: Support earliest seekable time in WMPI. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more androidfixes. Created 5 years, 1 month 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
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 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 m_cachedTime = webMediaPlayer()->currentTime(); 1732 m_cachedTime = webMediaPlayer()->currentTime();
1733 } 1733 }
1734 1734
1735 void HTMLMediaElement::invalidateCachedTime() 1735 void HTMLMediaElement::invalidateCachedTime()
1736 { 1736 {
1737 WTF_LOG(Media, "HTMLMediaElement::invalidateCachedTime(%p)", this); 1737 WTF_LOG(Media, "HTMLMediaElement::invalidateCachedTime(%p)", this);
1738 m_cachedTime = std::numeric_limits<double>::quiet_NaN(); 1738 m_cachedTime = std::numeric_limits<double>::quiet_NaN();
1739 } 1739 }
1740 1740
1741 // playback state 1741 // playback state
1742 double HTMLMediaElement::earliestTime() const
1743 {
1744 if (m_readyState == HAVE_NOTHING)
1745 return 0;
1746
1747 return webMediaPlayer()->earliestTime();
1748 }
1749
1742 double HTMLMediaElement::currentTime() const 1750 double HTMLMediaElement::currentTime() const
1743 { 1751 {
1744 if (m_defaultPlaybackStartPosition) 1752 if (m_defaultPlaybackStartPosition)
1745 return m_defaultPlaybackStartPosition; 1753 return m_defaultPlaybackStartPosition;
1746 1754
1747 if (m_readyState == HAVE_NOTHING) 1755 if (m_readyState == HAVE_NOTHING)
1748 return 0; 1756 return 0;
1749 1757
1750 if (m_seeking) { 1758 if (m_seeking) {
1751 WTF_LOG(Media, "HTMLMediaElement::currentTime(%p) - seeking, returning % f", this, m_lastSeekTime); 1759 WTF_LOG(Media, "HTMLMediaElement::currentTime(%p) - seeking, returning % f", this, m_lastSeekTime);
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
3655 visitor->trace(m_client); 3663 visitor->trace(m_client);
3656 } 3664 }
3657 3665
3658 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) 3666 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl)
3659 { 3667 {
3660 visitor->trace(m_client); 3668 visitor->trace(m_client);
3661 } 3669 }
3662 #endif 3670 #endif
3663 3671
3664 } 3672 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698