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

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

Issue 154283004: Move ReadyState enum from MediaControllerInterface to HTMLMediaElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: typedef Created 6 years, 10 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/MediaController.h ('k') | Source/core/html/MediaControllerInterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/MediaController.cpp
diff --git a/Source/core/html/MediaController.cpp b/Source/core/html/MediaController.cpp
index e93bbc1df30e8181ab3313874535b5e6699ad526..a8744fe07f761be1ccae9d4981f14c98454bd7ef 100644
--- a/Source/core/html/MediaController.cpp
+++ b/Source/core/html/MediaController.cpp
@@ -51,7 +51,7 @@ MediaController::MediaController(ExecutionContext* context)
, m_volume(1)
, m_position(MediaPlayer::invalidTime())
, m_muted(false)
- , m_readyState(HAVE_NOTHING)
+ , m_readyState(HTMLMediaElement::HAVE_NOTHING)
, m_playbackState(WAITING)
, m_asyncEventTimer(this, &MediaController::asyncEventTimerFired)
, m_clearPositionTimer(this, &MediaController::clearPositionTimerFired)
@@ -331,18 +331,18 @@ void MediaController::reportControllerState()
updatePlaybackState();
}
-static AtomicString eventNameForReadyState(MediaControllerInterface::ReadyState state)
+static const AtomicString& eventNameForReadyState(HTMLMediaElement::ReadyState state)
{
switch (state) {
- case MediaControllerInterface::HAVE_NOTHING:
+ case HTMLMediaElement::HAVE_NOTHING:
return EventTypeNames::emptied;
- case MediaControllerInterface::HAVE_METADATA:
+ case HTMLMediaElement::HAVE_METADATA:
return EventTypeNames::loadedmetadata;
- case MediaControllerInterface::HAVE_CURRENT_DATA:
+ case HTMLMediaElement::HAVE_CURRENT_DATA:
return EventTypeNames::loadeddata;
- case MediaControllerInterface::HAVE_FUTURE_DATA:
+ case HTMLMediaElement::HAVE_FUTURE_DATA:
return EventTypeNames::canplay;
- case MediaControllerInterface::HAVE_ENOUGH_DATA:
+ case HTMLMediaElement::HAVE_ENOUGH_DATA:
return EventTypeNames::canplaythrough;
default:
ASSERT_NOT_REACHED();
@@ -357,7 +357,7 @@ void MediaController::updateReadyState()
if (m_mediaElements.isEmpty()) {
// If the MediaController has no slaved media elements, let new readiness state be 0.
- newReadyState = HAVE_NOTHING;
+ newReadyState = HTMLMediaElement::HAVE_NOTHING;
} else {
// Otherwise, let it have the lowest value of the readyState IDL attributes of all of its
// slaved media elements.
« no previous file with comments | « Source/core/html/MediaController.h ('k') | Source/core/html/MediaControllerInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698