Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Unified Diff: content/browser/renderer_host/render_widget_host.h

Issue 8072011: Only allow to lock the mouse when the tab is in fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make changes in response to review comments & sync. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host.h
diff --git a/content/browser/renderer_host/render_widget_host.h b/content/browser/renderer_host/render_widget_host.h
index 9b6a14ca7dc632eb823ddbb3129ce4608f0f3c63..894e55134652382ca6c1bac3cb42c016941156e6 100644
--- a/content/browser/renderer_host/render_widget_host.h
+++ b/content/browser/renderer_host/render_widget_host.h
@@ -468,6 +468,12 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Listener,
virtual void NotifyRendererUnresponsive() {}
virtual void NotifyRendererResponsive() {}
+ // RenderViewHost overrides this method to impose further restrictions on when
+ // to allow mouse lock. For now, it only allows to lock the mouse when the
+ // current tab is in fullscreen mode.
+ virtual bool CanLockMouse() const;
+
+ void UnlockMouseIfNecessary();
bool IsMouseLocked() const;
protected:
« no previous file with comments | « content/browser/renderer_host/render_view_host_delegate.cc ('k') | content/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698