summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authoravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-30 05:10:13 +0000
committeravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-30 05:10:13 +0000
commitd7d7bf0946cfdf4f260b6921564c04b902476588 (patch)
tree0d19bbb8b357c3d2d83e773e5bdda3da1c26bfaa /media
parent9baab257aff137f368c37ace773ba9128ded0954 (diff)
downloadchromium_src-d7d7bf0946cfdf4f260b6921564c04b902476588.zip
chromium_src-d7d7bf0946cfdf4f260b6921564c04b902476588.tar.gz
chromium_src-d7d7bf0946cfdf4f260b6921564c04b902476588.tar.bz2
Allow some Android media player implementation to be overridden by embedders.
BUG=178307 R=qinmin@chromium.org,bulach@chromium.org Review URL: https://chromiumcodereview.appspot.com/15876006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/android/media_player_android.cc8
-rw-r--r--media/base/android/media_player_android.h2
-rw-r--r--media/base/android/media_player_bridge.cc8
-rw-r--r--media/base/android/media_player_bridge.h6
4 files changed, 22 insertions, 2 deletions
diff --git a/media/base/android/media_player_android.cc b/media/base/android/media_player_android.cc
index 90d4fa9..1b2b369 100644
--- a/media/base/android/media_player_android.cc
+++ b/media/base/android/media_player_android.cc
@@ -76,4 +76,12 @@ void MediaPlayerAndroid::OnSeekRequestAck() {
NOTREACHED() << "Unexpected ipc received";
}
+GURL MediaPlayerAndroid::GetUrl() {
+ return GURL();
+}
+
+GURL MediaPlayerAndroid::GetFirstPartyForCookies() {
+ return GURL();
+}
+
} // namespace media
diff --git a/media/base/android/media_player_android.h b/media/base/android/media_player_android.h
index ba6efd6..1124235 100644
--- a/media/base/android/media_player_android.h
+++ b/media/base/android/media_player_android.h
@@ -75,6 +75,8 @@ class MEDIA_EXPORT MediaPlayerAndroid {
virtual bool CanPause() = 0;
virtual bool CanSeekForward() = 0;
virtual bool CanSeekBackward() = 0;
+ virtual GURL GetUrl();
+ virtual GURL GetFirstPartyForCookies();
// Methods for DeumxerStreamPlayer.
// Informs DemuxerStreamPlayer that the demuxer is ready.
diff --git a/media/base/android/media_player_bridge.cc b/media/base/android/media_player_bridge.cc
index c7a4206..6fc4e16 100644
--- a/media/base/android/media_player_bridge.cc
+++ b/media/base/android/media_player_bridge.cc
@@ -417,4 +417,12 @@ bool MediaPlayerBridge::IsPlayerReady() {
return prepared_;
}
+GURL MediaPlayerBridge::GetUrl() {
+ return url_;
+}
+
+GURL MediaPlayerBridge::GetFirstPartyForCookies() {
+ return first_party_for_cookies_;
+}
+
} // namespace media
diff --git a/media/base/android/media_player_bridge.h b/media/base/android/media_player_bridge.h
index 4d08bc7..7dd5385 100644
--- a/media/base/android/media_player_bridge.h
+++ b/media/base/android/media_player_bridge.h
@@ -65,6 +65,8 @@ class MEDIA_EXPORT MediaPlayerBridge : public MediaPlayerAndroid {
virtual bool CanSeekForward() OVERRIDE;
virtual bool CanSeekBackward() OVERRIDE;
virtual bool IsPlayerReady() OVERRIDE;
+ virtual GURL GetUrl() OVERRIDE;
+ virtual GURL GetFirstPartyForCookies() OVERRIDE;
protected:
void SetMediaPlayer(jobject j_media_player);
@@ -83,10 +85,10 @@ class MEDIA_EXPORT MediaPlayerBridge : public MediaPlayerAndroid {
virtual void Prepare();
void OnMediaPrepared();
- private:
// Create the actual android media player.
- void CreateMediaPlayer();
+ virtual void CreateMediaPlayer();
+ private:
// Set the data source for the media player.
void SetDataSource(const std::string& url);