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

Unified Diff: trunk/Source/web/WebMediaPlayerClientImpl.cpp

Issue 320053003: Revert 175683 "Eliminate MediaPlayer & MediaPlayerClient abstrac..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/Source/web/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/web/WebMediaPlayerClientImpl.cpp
===================================================================
--- trunk/Source/web/WebMediaPlayerClientImpl.cpp (revision 175710)
+++ trunk/Source/web/WebMediaPlayerClientImpl.cpp (working copy)
@@ -205,6 +205,18 @@
m_webMediaPlayer->load(loadType, kurl, corsMode);
}
+double WebMediaPlayerClientImpl::rate() const
+{
+ return m_rate;
+}
+
+void WebMediaPlayerClientImpl::setRate(double rate)
+{
+ m_rate = rate;
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->setRate(rate);
+}
+
MediaPlayer::NetworkState WebMediaPlayerClientImpl::networkState() const
{
if (m_webMediaPlayer)
@@ -219,6 +231,25 @@
return MediaPlayer::HaveNothing;
}
+double WebMediaPlayerClientImpl::maxTimeSeekable() const
+{
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->maxTimeSeekable();
+ return 0.0;
+}
+
+PassRefPtr<TimeRanges> WebMediaPlayerClientImpl::buffered() const
+{
+ if (m_webMediaPlayer)
+ return TimeRanges::create(m_webMediaPlayer->buffered());
+ return TimeRanges::create();
+}
+
+bool WebMediaPlayerClientImpl::didLoadingProgress() const
+{
+ return m_webMediaPlayer && m_webMediaPlayer->didLoadingProgress();
+}
+
void WebMediaPlayerClientImpl::paint(GraphicsContext* context, const IntRect& rect)
{
// Normally GraphicsContext operations do nothing when painting is disabled.
@@ -308,6 +339,7 @@
WebMediaPlayerClientImpl::WebMediaPlayerClientImpl(MediaPlayerClient* client)
: m_client(client)
, m_preload(MediaPlayer::Auto)
+ , m_rate(1.0)
#if OS(ANDROID)
, m_usePaintOnAndroid(false)
#endif
« no previous file with comments | « trunk/Source/web/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698