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

Unified Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 2591783003: Implement pointer lock across outer/inner WebContents. (Closed)
Patch Set: rebase Created 3 years, 12 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: extensions/browser/guest_view/web_view/web_view_guest.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index 4276b3c9af6e79f98dbc8a99223c0b5b795a0ea8..47f4a6eebccae4b3e4006cae83a57e803ebed487 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -1375,6 +1375,16 @@ bool WebViewGuest::IsFullscreenForTabOrPending(
return is_guest_fullscreen_;
}
+void WebViewGuest::RequestToLockMouse(WebContents* web_contents,
+ bool user_gesture,
+ bool last_unlocked_by_target) {
+ RequestPointerLockPermission(
+ user_gesture, last_unlocked_by_target,
+ base::Bind(
+ base::IgnoreResult(&WebContents::GotResponseToLockMouseRequest),
+ base::Unretained(web_contents)));
+}
+
void WebViewGuest::LoadURLWithParams(
const GURL& url,
const content::Referrer& referrer,

Powered by Google App Engine
This is Rietveld 408576698