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

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

Issue 2556333002: Detect change on video/viewport intersection when rendered remotely (Closed)
Patch Set: Add API to WebMediaPlayerClient. Created 4 years 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
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 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 else 1978 else
1979 watch_time_reporter_->OnShown(); 1979 watch_time_reporter_->OnShown();
1980 } 1980 }
1981 1981
1982 bool WebMediaPlayerImpl::IsHidden() const { 1982 bool WebMediaPlayerImpl::IsHidden() const {
1983 DCHECK(main_task_runner_->BelongsToCurrentThread()); 1983 DCHECK(main_task_runner_->BelongsToCurrentThread());
1984 1984
1985 return delegate_ && delegate_->IsHidden(); 1985 return delegate_ && delegate_->IsHidden();
1986 } 1986 }
1987 1987
1988 void WebMediaPlayerImpl::OnRemoteDisplayChanged(bool is_displayed_remotely) {
1989 DCHECK(main_task_runner_->BelongsToCurrentThread());
1990
1991 client_->enableMonitorViewportIntersection(is_displayed_remotely);
1992 }
1993
1988 } // namespace media 1994 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698