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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1880713002: media: Don't idle suspend the pipeline when in fullscreen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delete newline Created 4 years, 8 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/blink/webmediaplayer_impl.h ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index b0affc0dcbd287fe4ec1acd2aa91dbb40ec4a948..c8a7835eb6dc57b364f74cc4e647caf6dffb96c4 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1084,8 +1084,8 @@ void WebMediaPlayerImpl::OnSuspendRequested(bool must_suspend) {
if (must_suspend) {
must_suspend_ = true;
} else {
- // TODO(sandersd): Remove this when |delegate_| becomes aware of this state.
- if (delegate_state_ == DelegateState::PAUSED_SEEK)
+ // TODO(sandersd): Remove this when idleness is separate from play state.
+ if (delegate_state_ == DelegateState::PAUSED_BUT_NOT_IDLE)
return;
is_idle_ = true;
}
@@ -1430,12 +1430,12 @@ void WebMediaPlayerImpl::SetDelegateState(DelegateState new_state) {
case DelegateState::PAUSED:
delegate_->DidPause(delegate_id_, false);
break;
- case DelegateState::PAUSED_SEEK:
+ case DelegateState::PAUSED_BUT_NOT_IDLE:
// It doesn't really matter what happens when we enter this state, only
// that we reset the idle timer when leaving it.
//
- // TODO(sandersd): Ideally |delegate_| would understand this state and not
- // run the idle timer.
+ // TODO(sandersd): Ideally the delegate would consider idleness and play
+ // state as orthogonal properties so that we could avoid this.
delegate_->DidPause(delegate_id_, false);
break;
case DelegateState::ENDED:
@@ -1534,8 +1534,8 @@ WebMediaPlayerImpl::UpdatePlayState_ComputePlayState(bool is_remote,
if (!has_session) {
result.delegate_state = DelegateState::GONE;
} else if (paused_) {
- if (seeking()) {
- result.delegate_state = DelegateState::PAUSED_SEEK;
+ if (seeking() || fullscreen_) {
+ result.delegate_state = DelegateState::PAUSED_BUT_NOT_IDLE;
} else if (ended_) {
result.delegate_state = DelegateState::ENDED;
} else {
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698