Provide a WebContents API to discover the playback of a fullscreen video.
That means a video is playing fullscreen, either directly (native controls) or
indirectly (custom controls). This is only exposed to the Java WebContents API
at the moment.
BUG=690960
Review-Url: https://codereview.chromium.org/2693203002
Cr-Commit-Position: refs/heads/master@{#452487}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 244b5d4..307e3fc 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4255,6 +4255,10 @@
return has_persistent_video_;
}
+bool WebContentsImpl::HasActiveEffectivelyFullscreenVideo() const {
+ return media_web_contents_observer_->HasActiveEffectivelyFullscreenVideo();
+}
+
bool WebContentsImpl::IsFocusedElementEditable() {
RenderFrameHostImpl* frame = GetFocusedFrame();
return frame && frame->has_focused_editable_element();