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

Unified Diff: Source/web/WebMediaPlayerClientImpl.cpp

Issue 291873002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updated as per the review comments 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
« no previous file with comments | « 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: Source/web/WebMediaPlayerClientImpl.cpp
diff --git a/Source/web/WebMediaPlayerClientImpl.cpp b/Source/web/WebMediaPlayerClientImpl.cpp
index 09635ef423ac7da4eb5cd1becf68b75abdb9aa93..3e58a63e22a147f0978a14fa5545b615d77dab4d 100644
--- a/Source/web/WebMediaPlayerClientImpl.cpp
+++ b/Source/web/WebMediaPlayerClientImpl.cpp
@@ -234,27 +234,6 @@ bool WebMediaPlayerClientImpl::canShowFullscreenOverlay() const
return m_webMediaPlayer && m_webMediaPlayer->canEnterFullscreen();
}
-IntSize WebMediaPlayerClientImpl::naturalSize() const
-{
- if (m_webMediaPlayer)
- return m_webMediaPlayer->naturalSize();
- return IntSize();
-}
-
-bool WebMediaPlayerClientImpl::hasVideo() const
-{
- if (m_webMediaPlayer)
- return m_webMediaPlayer->hasVideo();
- return false;
-}
-
-bool WebMediaPlayerClientImpl::hasAudio() const
-{
- if (m_webMediaPlayer)
- return m_webMediaPlayer->hasAudio();
- return false;
-}
-
double WebMediaPlayerClientImpl::duration() const
{
if (m_webMediaPlayer)
@@ -391,13 +370,6 @@ bool WebMediaPlayerClientImpl::hasSingleSecurityOrigin() const
return false;
}
-bool WebMediaPlayerClientImpl::didPassCORSAccessCheck() const
-{
- if (m_webMediaPlayer)
- return m_webMediaPlayer->didPassCORSAccessCheck();
- return false;
-}
-
double WebMediaPlayerClientImpl::mediaTimeForTimeValue(double timeValue) const
{
if (m_webMediaPlayer)
@@ -405,41 +377,6 @@ double WebMediaPlayerClientImpl::mediaTimeForTimeValue(double timeValue) const
return timeValue;
}
-unsigned WebMediaPlayerClientImpl::decodedFrameCount() const
-{
- if (m_webMediaPlayer)
- return m_webMediaPlayer->decodedFrameCount();
- return 0;
-}
-
-unsigned WebMediaPlayerClientImpl::droppedFrameCount() const
-{
- if (m_webMediaPlayer)
- return m_webMediaPlayer->droppedFrameCount();
- return 0;
-}
-
-unsigned WebMediaPlayerClientImpl::corruptedFrameCount() const
-{
- if (m_webMediaPlayer)
- return m_webMediaPlayer->corruptedFrameCount();
- return 0;
-}
-
-unsigned WebMediaPlayerClientImpl::audioDecodedByteCount() const
-{
- if (m_webMediaPlayer)
- return m_webMediaPlayer->audioDecodedByteCount();
- return 0;
-}
-
-unsigned WebMediaPlayerClientImpl::videoDecodedByteCount() const
-{
- if (m_webMediaPlayer)
- return m_webMediaPlayer->videoDecodedByteCount();
- return 0;
-}
-
#if ENABLE(WEB_AUDIO)
AudioSourceProvider* WebMediaPlayerClientImpl::audioSourceProvider()
{
@@ -469,7 +406,7 @@ void WebMediaPlayerClientImpl::paintOnAndroid(WebCore::GraphicsContext* context,
// which is not supported by Skia yet. The bitmap's size needs to be the same as the video and use naturalSize() here.
// Check if we could reuse existing texture based bitmap.
// Otherwise, release existing texture based bitmap and allocate a new one based on video size.
- if (!ensureTextureBackedSkBitmap(provider->grContext(), m_bitmap, naturalSize(), kTopLeft_GrSurfaceOrigin, kSkia8888_GrPixelConfig))
+ if (!ensureTextureBackedSkBitmap(provider->grContext(), m_bitmap, m_webMediaPlayer->naturalSize(), kTopLeft_GrSurfaceOrigin, kSkia8888_GrPixelConfig))
return;
// Copy video texture to bitmap texture.
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698