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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 2915613004: [PointerLock] Move "silent mouse lock" logic from renderer to RWHI (Closed)
Patch Set: jochen's comment: Remove 'const' before local bool Created 3 years, 6 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/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index d2ba7285f9fef018ca93c271d64997aa84c1f3cb..462b35c271711da9da4aa9ef3e41044070419ecc 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -938,7 +938,6 @@ void BrowserPluginGuest::OnExtendSelectionAndDelete(
}
void BrowserPluginGuest::OnLockMouse(bool user_gesture,
- bool last_unlocked_by_target,
bool privileged) {
if (pending_lock_request_) {
// Immediately reject the lock because only one pointerLock may be active
@@ -949,9 +948,12 @@ void BrowserPluginGuest::OnLockMouse(bool user_gesture,
pending_lock_request_ = true;
+ RenderWidgetHostImpl* owner = GetOwnerRenderWidgetHost();
+ bool is_last_unlocked_by_target =
+ owner ? owner->is_last_unlocked_by_target() : false;
+
delegate_->RequestPointerLockPermission(
- user_gesture,
- last_unlocked_by_target,
+ user_gesture, is_last_unlocked_by_target,
base::Bind(&BrowserPluginGuest::PointerLockPermissionResponse,
weak_ptr_factory_.GetWeakPtr()));
}
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.h ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698