Skip to content

Commit

Permalink
Fix #55: Support (video) element fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Jul 25, 2014
1 parent d4d7f14 commit a3a537b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/nw_shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion src/nw_shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_; }
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a3a537b

Please sign in to comment.