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

Unified Diff: media/remoting/remoting_renderer_controller.cc

Issue 2511143006: Detect change on the intersection of video and viewport. (Closed)
Patch Set: Addressed comments from PS#2. 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_renderer_controller.cc
diff --git a/media/remoting/remoting_renderer_controller.cc b/media/remoting/remoting_renderer_controller.cc
index c9cb743cc1e27004115b9bddcdbd55fee64f70e7..d554053ec004a1aa0567035c48d4afe3776e6075 100644
--- a/media/remoting/remoting_renderer_controller.cc
+++ b/media/remoting/remoting_renderer_controller.cc
@@ -60,6 +60,13 @@ void RemotingRendererController::OnExitedFullscreen() {
UpdateAndMaybeSwitch();
}
+void RemotingRendererController::OnStablyFilledMostViewportChanged(
+ bool is_mostly_filling_viewport) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ is_mostly_filling_viewport_ = is_mostly_filling_viewport;
+ UpdateAndMaybeSwitch();
+}
+
void RemotingRendererController::OnSetCdm(CdmContext* cdm_context) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -195,10 +202,10 @@ bool RemotingRendererController::ShouldBeRemoting() {
(has_audio() && !IsAudioCodecSupported()))
return false;
- // Normally, entering fullscreen is the signal that starts remote rendering.
- // However, current technical limitations require encrypted content be remoted
- // without waiting for a user signal.
- return is_fullscreen_;
+ // Normally, entering fullscreen or filling most of the viewport is the signal
+ // that starts remote rendering. However, current technical limitations
+ // require encrypted content be remoted without waiting for a user signal.
+ return is_fullscreen_ || is_mostly_filling_viewport_;
}
void RemotingRendererController::UpdateAndMaybeSwitch() {

Powered by Google App Engine
This is Rietveld 408576698