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

Unified Diff: media/remoting/remoting_controller.cc

Issue 2475643004: Monitor the intersection of video and viewport. (Closed)
Patch Set: Consolidate two ElementVisibilityObserver in AUtoplayUmaHelper. Created 4 years, 1 month 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: media/remoting/remoting_controller.cc
diff --git a/media/remoting/remoting_controller.cc b/media/remoting/remoting_controller.cc
index 73c372f68673518e429677979a24dbd83fd66864..0da71667333a47a3446dc2bb4d2283a4787b3302 100644
--- a/media/remoting/remoting_controller.cc
+++ b/media/remoting/remoting_controller.cc
@@ -142,6 +142,13 @@ void RemotingController::OnExitedFullscreen() {
UpdateAndMaybeSwitch();
}
+void RemotingController::OnVideoViewportRatioChanged(double ratio) {
+ DCHECK(task_runner_->BelongsToCurrentThread());
+
+ is_fullscreen_ = ratio > 0.85;
miu 2016/11/05 02:47:46 Need "debouncing" logic here. Something like "no c
xjz 2016/11/09 02:24:28 Done.
+ UpdateAndMaybeSwitch();
+}
+
void RemotingController::OnSetCdm(CdmContext* cdm_context) {
DCHECK(task_runner_->BelongsToCurrentThread());

Powered by Google App Engine
This is Rietveld 408576698