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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 644463003: [Cast, Android] Don't hold the wake lock if the video is playing remotely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ignore remote players altogether Created 6 years, 2 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
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a5e5044d9a04e4d6bbc54dd54da9ce332e457df7..104f8c63fab5ed61390267d391cd9352ac5a4723 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3105,7 +3105,12 @@ void WebContentsImpl::MaybeReleasePowerSaveBlockers() {
void WebContentsImpl::OnMediaPlayingNotification(int64 player_cookie,
bool has_video,
- bool has_audio) {
+ bool has_audio,
+ bool is_remote) {
+ // Ignore the videos playing remotely and don't hold the wake lock for the
+ // screen.
+ if (is_remote) return;
+
if (has_audio) {
AddMediaPlayerEntry(player_cookie, &active_audio_players_);
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698