chore: implement WebContentsDelegate::GetFullscreenState (#38141)

Refs https://chromium-review.googlesource.com/c/chromium/src/+/4255184
This commit is contained in:
Shelley Vohr 2023-05-03 15:55:47 +02:00 committed by GitHub
parent 7f5364f98d
commit ee1e6aab3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -3759,6 +3759,12 @@ bool WebContents::IsFullscreenForTabOrPending(
return is_html_fullscreen() || (in_transition && is_html_transition); return is_html_fullscreen() || (in_transition && is_html_transition);
} }
content::FullscreenState WebContents::GetFullscreenState(
const content::WebContents* source) const {
return exclusive_access_manager_->fullscreen_controller()->GetFullscreenState(
source);
}
bool WebContents::TakeFocus(content::WebContents* source, bool reverse) { bool WebContents::TakeFocus(content::WebContents* source, bool reverse) {
if (source && source->GetOutermostWebContents() == source) { if (source && source->GetOutermostWebContents() == source) {
// If this is the outermost web contents and the user has tabbed or // If this is the outermost web contents and the user has tabbed or

View file

@ -696,6 +696,8 @@ class WebContents : public ExclusiveAccessContext,
// content::WebContentsDelegate // content::WebContentsDelegate
bool IsFullscreenForTabOrPending(const content::WebContents* source) override; bool IsFullscreenForTabOrPending(const content::WebContents* source) override;
content::FullscreenState GetFullscreenState(
const content::WebContents* web_contents) const override;
bool TakeFocus(content::WebContents* source, bool reverse) override; bool TakeFocus(content::WebContents* source, bool reverse) override;
content::PictureInPictureResult EnterPictureInPicture( content::PictureInPictureResult EnterPictureInPicture(
content::WebContents* web_contents) override; content::WebContents* web_contents) override;