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

Unified Diff: media/remoting/remoting_renderer_controller.cc

Issue 2511143006: Detect change on the intersection of video and viewport. (Closed)
Patch Set: Rebase again. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/remoting/remoting_renderer_controller.h ('k') | third_party/WebKit/Source/core/dom/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/remoting/remoting_renderer_controller.cc
diff --git a/media/remoting/remoting_renderer_controller.cc b/media/remoting/remoting_renderer_controller.cc
index 72799b9f05a48fc76c0568649f43290c46f6d0e9..f1abc93d3a6b4531a8c22f7fdf8fae7f46e0fd76 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::OnBecameDominantVisibleContent(
+ bool is_dominant) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ is_dominant_content_ = is_dominant;
+ UpdateAndMaybeSwitch();
+}
+
void RemotingRendererController::OnSetCdm(CdmContext* cdm_context) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -215,10 +222,10 @@ bool RemotingRendererController::ShouldBeRemoting() {
if (is_remote_playback_disabled_)
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 being the dominant visible content 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_dominant_content_;
}
void RemotingRendererController::UpdateAndMaybeSwitch() {
« no previous file with comments | « media/remoting/remoting_renderer_controller.h ('k') | third_party/WebKit/Source/core/dom/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698