diff --git a/src/nw_shell.cc b/src/nw_shell.cc index d72190b514..ef9a8032d6 100644 --- a/src/nw_shell.cc +++ b/src/nw_shell.cc @@ -718,4 +718,8 @@ void Shell::ToggleFullscreenModeForTab(WebContents* web_contents, window()->SetFullscreen(enter_fullscreen); } +bool Shell::IsFullscreenForTabOrPending(const WebContents* web_contents) const { + return window()->IsFullscreen(); +} + } // namespace content diff --git a/src/nw_shell.h b/src/nw_shell.h index c38144214b..be01017f46 100644 --- a/src/nw_shell.h +++ b/src/nw_shell.h @@ -130,7 +130,7 @@ class Shell : public WebContentsDelegate, static int exit_code() { return exit_code_; } WebContents* web_contents() const { return web_contents_.get(); } - nw::NativeWindow* window() { return window_.get(); } + nw::NativeWindow* window() const { return window_.get(); } void set_force_close(bool force) { force_close_ = force; } bool is_devtools() const { return is_devtools_; } @@ -167,6 +167,8 @@ class Shell : public WebContentsDelegate, WebContents* new_contents) OVERRIDE; virtual void ToggleFullscreenModeForTab(WebContents* web_contents, bool enter_fullscreen) OVERRIDE; + virtual bool IsFullscreenForTabOrPending( + const WebContents* web_contents) const OVERRIDE; #if defined(OS_WIN) virtual void WebContentsFocused(WebContents* contents) OVERRIDE; #endif