diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 9fe4cc882c72..b901e0793bf5 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -3759,6 +3759,12 @@ bool WebContents::IsFullscreenForTabOrPending( 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) { if (source && source->GetOutermostWebContents() == source) { // If this is the outermost web contents and the user has tabbed or diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index bcd01b9c3f51..e524bceda032 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -696,6 +696,8 @@ class WebContents : public ExclusiveAccessContext, // content::WebContentsDelegate 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; content::PictureInPictureResult EnterPictureInPicture( content::WebContents* web_contents) override;