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

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

Issue 896673003: Propagate audible state from player to the containing tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing copyright notice Created 5 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 | « media/base/android/media_player_android.h ('k') | media/base/android/media_player_bridge.cc » ('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 954ba96c70d2f67d487daa923774e10d112ffe8b..eb52e3a57b680968654485fac4be23ad27391d23 100644
--- a/media/base/android/media_player_android.cc
+++ b/media/base/android/media_player_android.cc
@@ -21,6 +21,7 @@ MediaPlayerAndroid::MediaPlayerAndroid(
player_id_(player_id),
manager_(manager),
frame_url_(frame_url),
+ is_audible_(false),
weak_factory_(this) {
listener_.reset(new MediaPlayerListener(base::MessageLoopProxy::current(),
weak_factory_.GetWeakPtr()));
@@ -79,5 +80,11 @@ void MediaPlayerAndroid::DetachListener() {
listener_->ReleaseMediaPlayerListenerResources();
}
+void MediaPlayerAndroid::SetAudible(bool is_audible) {
+ if (is_audible_ != is_audible) {
+ is_audible_ = is_audible;
+ manager_->OnAudibleStateChanged(player_id(), is_audible_);
+ }
+}
} // namespace media
« no previous file with comments | « media/base/android/media_player_android.h ('k') | media/base/android/media_player_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698