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

Unified Diff: Source/web/WebMediaPlayerClientImpl.cpp

Issue 304353005: Eliminate MediaPlayer & MediaPlayerClient abstractions(rate, setRate and other APIs) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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
Index: Source/web/WebMediaPlayerClientImpl.cpp
diff --git a/Source/web/WebMediaPlayerClientImpl.cpp b/Source/web/WebMediaPlayerClientImpl.cpp
index ce4a9341a33b358954fe4897dfa37803f1a51bbc..5a07e6a3d0cb7f2d3dab686f93beb7a444c62677 100644
--- a/Source/web/WebMediaPlayerClientImpl.cpp
+++ b/Source/web/WebMediaPlayerClientImpl.cpp
@@ -196,6 +196,8 @@ void WebMediaPlayerClientImpl::load(WebMediaPlayer::LoadType loadType, const WTF
m_webMediaPlayer->setPoster(poster);
+ m_webMediaPlayer->setRate(mediaElement().playbackRate());
+
#if OS(ANDROID)
m_usePaintOnAndroid = (loadType != WebMediaPlayer::LoadTypeMediaStream);
#endif
@@ -244,18 +246,6 @@ bool WebMediaPlayerClientImpl::seeking() const
return false;
}
-double WebMediaPlayerClientImpl::rate() const
-{
- return m_rate;
-}
-
-void WebMediaPlayerClientImpl::setRate(double rate)
-{
- m_rate = rate;
- if (m_webMediaPlayer)
- m_webMediaPlayer->setRate(rate);
-}
-
bool WebMediaPlayerClientImpl::paused() const
{
if (m_webMediaPlayer)
@@ -290,25 +280,6 @@ MediaPlayer::ReadyState WebMediaPlayerClientImpl::readyState() const
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.
@@ -412,7 +383,6 @@ void WebMediaPlayerClientImpl::paintOnAndroid(WebCore::GraphicsContext* context,
WebMediaPlayerClientImpl::WebMediaPlayerClientImpl(MediaPlayerClient* client)
: m_client(client)
, m_preload(MediaPlayer::Auto)
- , m_rate(1.0)
#if OS(ANDROID)
, m_usePaintOnAndroid(false)
#endif
« Source/core/html/HTMLMediaElement.cpp ('K') | « Source/web/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698