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

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

Issue 314413003: Revert 175546 "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 175711)
+++ trunk/Source/web/WebMediaPlayerClientImpl.cpp (working copy)
@@ -205,6 +205,33 @@
m_webMediaPlayer->load(loadType, kurl, corsMode);
}
+double WebMediaPlayerClientImpl::duration() const
+{
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->duration();
+ return 0.0;
+}
+
+double WebMediaPlayerClientImpl::currentTime() const
+{
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->currentTime();
+ return 0.0;
+}
+
+void WebMediaPlayerClientImpl::seek(double time)
+{
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->seek(time);
+}
+
+bool WebMediaPlayerClientImpl::seeking() const
+{
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->seeking();
+ return false;
+}
+
double WebMediaPlayerClientImpl::rate() const
{
return m_rate;
@@ -217,6 +244,12 @@
m_webMediaPlayer->setRate(rate);
}
+void WebMediaPlayerClientImpl::setPoster(const KURL& poster)
+{
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->setPoster(WebURL(poster));
+}
+
MediaPlayer::NetworkState WebMediaPlayerClientImpl::networkState() const
{
if (m_webMediaPlayer)
« 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