fix: pointer lock permission after focus loss and regain (#45628)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
b6884b5c50
commit
b2b59a6c0b
2 changed files with 8 additions and 0 deletions
|
@ -1561,6 +1561,12 @@ void WebContents::LostPointerLock() {
|
|||
->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,
|
||||
bool esc_key_locked,
|
||||
bool allowed) {
|
||||
|
|
|
@ -609,6 +609,8 @@ class WebContents final : public ExclusiveAccessContext,
|
|||
bool user_gesture,
|
||||
bool last_unlocked_by_target) override;
|
||||
void LostPointerLock() override;
|
||||
bool IsWaitingForPointerLockPrompt(
|
||||
content::WebContents* web_contents) override;
|
||||
void OnRequestKeyboardLock(content::WebContents* web_contents,
|
||||
bool esc_key_locked,
|
||||
bool allowed);
|
||||
|
|
Loading…
Add table
Reference in a new issue