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

Unified Diff: Source/core/html/HTMLMediaElement.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/core/frame/ImageBitmap.cpp ('k') | Source/core/html/HTMLVideoElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 5989e22687f9677f46374eca682cd28eec45fbd8..ff1b5ae54759f40339e633234b649de8233e9f9c 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -1826,7 +1826,7 @@ HTMLMediaElement::ReadyState HTMLMediaElement::readyState() const
bool HTMLMediaElement::hasAudio() const
{
- return m_player ? m_player->hasAudio() : false;
+ return webMediaPlayer() && webMediaPlayer()->hasAudio();
}
bool HTMLMediaElement::seeking() const
@@ -3244,16 +3244,16 @@ void HTMLMediaElement::setClosedCaptionsVisible(bool closedCaptionVisible)
unsigned HTMLMediaElement::webkitAudioDecodedByteCount() const
{
- if (!m_player)
+ if (!webMediaPlayer())
return 0;
- return m_player->audioDecodedByteCount();
+ return webMediaPlayer()->audioDecodedByteCount();
}
unsigned HTMLMediaElement::webkitVideoDecodedByteCount() const
{
- if (!m_player)
+ if (!webMediaPlayer())
return 0;
- return m_player->videoDecodedByteCount();
+ return webMediaPlayer()->videoDecodedByteCount();
}
bool HTMLMediaElement::isURLAttribute(const Attribute& attribute) const
« no previous file with comments | « Source/core/frame/ImageBitmap.cpp ('k') | Source/core/html/HTMLVideoElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698