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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2592243002: Perform direct routing of mouse events when the pointer is locked. (Closed)
Patch Set: transform event, add tests Created 3 years, 10 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/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 30cc8989e92062def7bacd32f14c6e30c5107a27..de05ba9f50ce097b19f1c00aa2c3f9229180d4d1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1991,6 +1991,13 @@ bool WebContentsImpl::HasMouseLock(RenderWidgetHostImpl* render_widget_host) {
GetTopLevelRenderWidgetHostView()->IsMouseLocked();
}
+RenderWidgetHostImpl* WebContentsImpl::MouseLockWidget() {
+ if (GetTopLevelRenderWidgetHostView()->IsMouseLocked())
+ return mouse_lock_widget_;
+
+ return nullptr;
+}
+
void WebContentsImpl::OnRenderFrameProxyVisibilityChanged(bool visible) {
if (visible && !GetOuterWebContents()->IsHidden())
WasShown();

Powered by Google App Engine
This is Rietveld 408576698