FOR_EACH_OBSERVER(NativeWindowObserver, observers_, OnRendererResponsive());
}
+void NativeWindow::EnterFullscreenModeForTab(content::WebContents* source,
+ const GURL& origin) {
+ SetFullScreen(true);
+}
+
+void NativeWindow::ExitFullscreenModeForTab(content::WebContents* source) {
+ SetFullScreen(false);
+}
+
+bool NativeWindow::IsFullscreenForTabOrPending(
+ const content::WebContents* source) const {
+ return IsFullscreen();
+}
+
void NativeWindow::BeforeUnloadFired(const base::TimeTicks& proceed_time) {
// Do nothing, we override this method just to avoid compilation error since
// there are two virtual functions named BeforeUnloadFired.
virtual void Restore() = 0;
virtual bool IsMinimized() = 0;
virtual void SetFullScreen(bool fullscreen) = 0;
- virtual bool IsFullscreen() = 0;
+ virtual bool IsFullscreen() const = 0;
virtual void SetSize(const gfx::Size& size) = 0;
virtual gfx::Size GetSize() = 0;
virtual void SetContentSize(const gfx::Size& size) = 0;
const content::WebContents* source) const override;
void RendererUnresponsive(content::WebContents* source) override;
void RendererResponsive(content::WebContents* source) override;
+ void EnterFullscreenModeForTab(content::WebContents* source,
+ const GURL& origin) override;
+ void ExitFullscreenModeForTab(content::WebContents* source) override;
+ bool IsFullscreenForTabOrPending(
+ const content::WebContents* source) const override;
// Implementations of content::WebContentsObserver.
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
void Restore() override;
bool IsMinimized() override;
void SetFullScreen(bool fullscreen) override;
- bool IsFullscreen() override;
+ bool IsFullscreen() const override;
void SetSize(const gfx::Size& size) override;
gfx::Size GetSize() override;
void SetContentSize(const gfx::Size& size) override;
[window_ toggleFullScreen:nil];
}
-bool NativeWindowMac::IsFullscreen() {
+bool NativeWindowMac::IsFullscreen() const {
return [window_ styleMask] & NSFullScreenWindowMask;
}
#endif
}
-bool NativeWindowViews::IsFullscreen() {
+bool NativeWindowViews::IsFullscreen() const {
return window_->IsFullscreen();
}
void Restore() override;
bool IsMinimized() override;
void SetFullScreen(bool fullscreen) override;
- bool IsFullscreen() override;
+ bool IsFullscreen() const override;
void SetSize(const gfx::Size& size) override;
gfx::Size GetSize() override;
void SetContentSize(const gfx::Size& size) override;