Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |