diff options
author | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 19:04:02 +0000 |
---|---|---|
committer | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 19:04:02 +0000 |
commit | bbb5eba591a4226e8a4ff8f617c6e86fd428664c (patch) | |
tree | 5237c106016ae63a148b8c0b4df46030119b7c8c /webkit/media | |
parent | 2da8060fe765a97c68de1f36398f5bf988662f8d (diff) | |
download | chromium_src-bbb5eba591a4226e8a4ff8f617c6e86fd428664c.zip chromium_src-bbb5eba591a4226e8a4ff8f617c6e86fd428664c.tar.gz chromium_src-bbb5eba591a4226e8a4ff8f617c6e86fd428664c.tar.bz2 |
Add MediaPlayerAndroid as a super class for all media player implementations on android.
There are several different implementations of media players on Android.
Currently they all inherit from MediaPlayerBridge.
This only works if their java player is a subclass of Android MediaPlayer class, which is not necessary in some cases.
Additionally, we are not going to use any subclass of android MediaPlayer for MSE implementation
As a result, this change introduces a super class for all the media player implementations.
BUG=233420
R=scherkus@chromium.org, ycheo@chromium.org, yfriedman@chromium.org
Review URL: https://codereview.chromium.org/14762006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198957 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media')
-rw-r--r-- | webkit/media/android/webmediaplayer_android.cc | 12 | ||||
-rw-r--r-- | webkit/media/android/webmediaplayer_android.h | 2 | ||||
-rw-r--r-- | webkit/media/android/webmediaplayer_proxy_android.h | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/webkit/media/android/webmediaplayer_android.cc b/webkit/media/android/webmediaplayer_android.cc index 3edcbf7..da41718 100644 --- a/webkit/media/android/webmediaplayer_android.cc +++ b/webkit/media/android/webmediaplayer_android.cc @@ -10,7 +10,7 @@ #include "base/strings/string_number_conversions.h" #include "cc/layers/video_layer.h" #include "gpu/GLES2/gl2extchromium.h" -#include "media/base/android/media_player_bridge.h" +#include "media/base/android/media_player_android.h" #include "media/base/video_frame.h" #include "net/base/mime_util.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" @@ -37,7 +37,7 @@ using WebKit::WebSize; using WebKit::WebString; using WebKit::WebTimeRanges; using WebKit::WebURL; -using media::MediaPlayerBridge; +using media::MediaPlayerAndroid; using media::VideoFrame; namespace webkit_media { @@ -434,16 +434,16 @@ void WebMediaPlayerAndroid::OnSeekComplete(base::TimeDelta current_time) { void WebMediaPlayerAndroid::OnMediaError(int error_type) { switch (error_type) { - case MediaPlayerBridge::MEDIA_ERROR_FORMAT: + case MediaPlayerAndroid::MEDIA_ERROR_FORMAT: UpdateNetworkState(WebMediaPlayer::NetworkStateFormatError); break; - case MediaPlayerBridge::MEDIA_ERROR_DECODE: + case MediaPlayerAndroid::MEDIA_ERROR_DECODE: UpdateNetworkState(WebMediaPlayer::NetworkStateDecodeError); break; - case MediaPlayerBridge::MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK: + case MediaPlayerAndroid::MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK: UpdateNetworkState(WebMediaPlayer::NetworkStateFormatError); break; - case MediaPlayerBridge::MEDIA_ERROR_INVALID_CODE: + case MediaPlayerAndroid::MEDIA_ERROR_INVALID_CODE: break; } client_->repaint(); diff --git a/webkit/media/android/webmediaplayer_android.h b/webkit/media/android/webmediaplayer_android.h index e07d48f..a00c07d 100644 --- a/webkit/media/android/webmediaplayer_android.h +++ b/webkit/media/android/webmediaplayer_android.h @@ -53,7 +53,7 @@ class WebMediaPlayerAndroid public base::MessageLoop::DestructionObserver { public: // Construct a WebMediaPlayerAndroid object. This class communicates - // with the MediaPlayerBridge object in the browser process through + // with the MediaPlayerAndroid object in the browser process through // |proxy|. // TODO(qinmin): |frame| argument is used to determine whether the current // player can enter fullscreen. This logic should probably be moved into diff --git a/webkit/media/android/webmediaplayer_proxy_android.h b/webkit/media/android/webmediaplayer_proxy_android.h index a1c4277b..fd68410 100644 --- a/webkit/media/android/webmediaplayer_proxy_android.h +++ b/webkit/media/android/webmediaplayer_proxy_android.h @@ -23,7 +23,7 @@ class WebMediaPlayerProxyAndroid { public: virtual ~WebMediaPlayerProxyAndroid(); - // Initialize a MediaPlayerBridge object in browser process + // Initialize a MediaPlayerAndroid object in browser process virtual void Initialize(int player_id, const GURL& url, bool is_media_source, const GURL& first_party_for_cookies) = 0; |