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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 1813373003: Release media session and power save blockers for casting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 paused_time_ = pipeline_.GetMediaTime(); 876 paused_time_ = pipeline_.GetMediaTime();
877 #endif 877 #endif
878 } 878 }
879 if (time_updated) 879 if (time_updated)
880 should_notify_time_changed_ = true; 880 should_notify_time_changed_ = true;
881 } 881 }
882 882
883 void WebMediaPlayerImpl::OnPipelineSuspended() { 883 void WebMediaPlayerImpl::OnPipelineSuspended() {
884 #if defined(OS_ANDROID) 884 #if defined(OS_ANDROID)
885 if (isRemote()) { 885 if (isRemote()) {
886 if (delegate_)
887 delegate_->PlayerGone(delegate_id_);
hubbe 2016/03/18 21:40:24 This doesn't seem right. The browser side already
DaleCurtis 2016/03/18 21:43:38 AFAICT WMPI::pause() is never called when suspendi
hubbe 2016/03/18 23:09:43 I could have sworn this was working correctly at s
DaleCurtis 2016/03/18 23:22:24 OnPipelineResumed() will restart playback if neces
886 scoped_refptr<VideoFrame> frame = cast_impl_.GetCastingBanner(); 888 scoped_refptr<VideoFrame> frame = cast_impl_.GetCastingBanner();
887 if (frame) { 889 if (frame) {
888 compositor_->PaintFrameUsingOldRenderingPath(frame); 890 compositor_->PaintFrameUsingOldRenderingPath(frame);
889 } 891 }
890 } 892 }
891 #endif 893 #endif
892 894
893 memory_usage_reporting_timer_.Stop(); 895 memory_usage_reporting_timer_.Stop();
894 ReportMemoryUsage(); 896 ReportMemoryUsage();
895 897
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 bool WebMediaPlayerImpl::IsAutomaticResumeAllowed() { 1514 bool WebMediaPlayerImpl::IsAutomaticResumeAllowed() {
1513 #if defined(OS_ANDROID) 1515 #if defined(OS_ANDROID)
1514 return !hasVideo() || (delegate_ && !delegate_->IsHidden()); 1516 return !hasVideo() || (delegate_ && !delegate_->IsHidden());
1515 #else 1517 #else
1516 // On non-Android platforms Resume() is always allowed. 1518 // On non-Android platforms Resume() is always allowed.
1517 return true; 1519 return true;
1518 #endif 1520 #endif
1519 } 1521 }
1520 1522
1521 } // namespace media 1523 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698