fix: pointer lock permission after focus loss and regain (#45574)
This commit is contained in:
parent
a1e4550c9e
commit
47dbab3856
2 changed files with 8 additions and 0 deletions
|
@ -1608,6 +1608,12 @@ void WebContents::LostPointerLock() {
|
||||||
->ExitExclusiveAccessToPreviousState();
|
->ExitExclusiveAccessToPreviousState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WebContents::IsWaitingForPointerLockPrompt(
|
||||||
|
content::WebContents* web_contents) {
|
||||||
|
return exclusive_access_manager_.pointer_lock_controller()
|
||||||
|
->IsWaitingForPointerLockPrompt(web_contents);
|
||||||
|
}
|
||||||
|
|
||||||
void WebContents::OnRequestKeyboardLock(content::WebContents* web_contents,
|
void WebContents::OnRequestKeyboardLock(content::WebContents* web_contents,
|
||||||
bool esc_key_locked,
|
bool esc_key_locked,
|
||||||
bool allowed) {
|
bool allowed) {
|
||||||
|
|
|
@ -613,6 +613,8 @@ class WebContents final : public ExclusiveAccessContext,
|
||||||
bool user_gesture,
|
bool user_gesture,
|
||||||
bool last_unlocked_by_target) override;
|
bool last_unlocked_by_target) override;
|
||||||
void LostPointerLock() override;
|
void LostPointerLock() override;
|
||||||
|
bool IsWaitingForPointerLockPrompt(
|
||||||
|
content::WebContents* web_contents) override;
|
||||||
void OnRequestKeyboardLock(content::WebContents* web_contents,
|
void OnRequestKeyboardLock(content::WebContents* web_contents,
|
||||||
bool esc_key_locked,
|
bool esc_key_locked,
|
||||||
bool allowed);
|
bool allowed);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue