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

Unified Diff: media/base/android/media_player_android.cc

Issue 1076013002: Added stub MediaSourcePlayer for developing behind the flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed clang build Created 5 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 | « media/base/android/media_player_android.h ('k') | media/base/media_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_player_android.cc
diff --git a/media/base/android/media_player_android.cc b/media/base/android/media_player_android.cc
index 9f224c9b675cb08e80f6cf87460cddbff65e440d..60e1dfc0f823268042381b5e4514931290c3d2b8 100644
--- a/media/base/android/media_player_android.cc
+++ b/media/base/android/media_player_android.cc
@@ -30,6 +30,11 @@ MediaPlayerAndroid::MediaPlayerAndroid(
MediaPlayerAndroid::~MediaPlayerAndroid() {}
+// For most subclasses we can delete on the caller thread.
+void MediaPlayerAndroid::DeleteOnCorrectThread() {
+ delete this;
+}
+
GURL MediaPlayerAndroid::GetUrl() {
return GURL();
}
@@ -81,6 +86,11 @@ void MediaPlayerAndroid::DetachListener() {
listener_->ReleaseMediaPlayerListenerResources();
}
+void MediaPlayerAndroid::DestroyListenerOnUIThread() {
+ weak_factory_.InvalidateWeakPtrs();
+ listener_.reset();
+}
+
void MediaPlayerAndroid::SetAudible(bool is_audible) {
if (is_audible_ != is_audible) {
is_audible_ = is_audible;
« no previous file with comments | « media/base/android/media_player_android.h ('k') | media/base/media_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698