diff options
Diffstat (limited to 'content/browser/renderer_host/render_view_host.cc')
-rw-r--r-- | content/browser/renderer_host/render_view_host.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc index e051c0f..431d87b 100644 --- a/content/browser/renderer_host/render_view_host.cc +++ b/content/browser/renderer_host/render_view_host.cc @@ -1131,6 +1131,11 @@ void RenderViewHost::NotifyRendererResponsive() { delegate_->RendererResponsive(this); } +bool RenderViewHost::CanLockMouse() const { + // Only allow to lock the mouse when the current tab is in fullscreen mode. + return delegate_->IsFullscreenForCurrentTab(); +} + void RenderViewHost::OnMsgFocus() { delegate_->Activate(); } @@ -1223,6 +1228,8 @@ void RenderViewHost::SetAltErrorPageURL(const GURL& url) { } void RenderViewHost::ExitFullscreen() { + UnlockMouseIfNecessary(); + Send(new ViewMsg_ExitFullscreen(routing_id())); } |