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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 318923004: Eliminate MediaPlayer & MediaPlayerClient abstractions(readystate) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review comments 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 | « Source/core/html/HTMLMediaElement.h ('k') | Source/modules/imagebitmap/ImageBitmapFactories.cpp » ('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 380683b173f4715adebd76644a288b3f03b27a4b..1182859371c93b44dd36a20421dc8a822030725c 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -1232,9 +1232,9 @@ bool HTMLMediaElement::textTracksAreReady() const
void HTMLMediaElement::textTrackReadyStateChanged(TextTrack* track)
{
- if (m_player && m_textTracksWhenResourceSelectionBegan.contains(track)) {
+ if (webMediaPlayer()&& m_textTracksWhenResourceSelectionBegan.contains(track)) {
if (track->readinessState() != TextTrack::Loading)
- setReadyState(m_player->readyState());
+ setReadyState(static_cast<ReadyState>(webMediaPlayer()->readyState()));
} else {
// The track readiness state might have changed as a result of the user
// clicking the captions button. In this case, a check whether all the
@@ -1586,10 +1586,10 @@ void HTMLMediaElement::changeNetworkStateFromLoadingToIdle()
void HTMLMediaElement::mediaPlayerReadyStateChanged()
{
- setReadyState(m_player->readyState());
+ setReadyState(static_cast<ReadyState>(webMediaPlayer()->readyState()));
}
-void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
+void HTMLMediaElement::setReadyState(ReadyState state)
{
WTF_LOG(Media, "HTMLMediaElement::setReadyState(%d) - current state is %d,", static_cast<int>(state), static_cast<int>(m_readyState));
@@ -1597,7 +1597,7 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
bool wasPotentiallyPlaying = potentiallyPlaying();
ReadyState oldState = m_readyState;
- ReadyState newState = static_cast<ReadyState>(state);
+ ReadyState newState = state;
bool tracksAreReady = textTracksAreReady();
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/modules/imagebitmap/ImageBitmapFactories.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698