feat: keyboard.lock() should use permissions helper (#40369)

feat: `keyboard.lock()` should use permissions helper
This commit is contained in:
Shelley Vohr 2023-11-06 11:54:31 -08:00 committed by GitHub
parent ee108903a0
commit 7999ea39e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 45 additions and 13 deletions

View file

@ -568,14 +568,17 @@ class WebContents : public ExclusiveAccessContext,
const gfx::Rect& selection_rect,
int active_match_ordinal,
bool final_update) override;
void RequestExclusivePointerAccess(content::WebContents* web_contents,
bool user_gesture,
bool last_unlocked_by_target,
bool allowed);
void OnRequestToLockMouse(content::WebContents* web_contents,
bool user_gesture,
bool last_unlocked_by_target,
bool allowed);
void RequestToLockMouse(content::WebContents* web_contents,
bool user_gesture,
bool last_unlocked_by_target) override;
void LostMouseLock() override;
void OnRequestKeyboardLock(content::WebContents* web_contents,
bool esc_key_locked,
bool allowed);
void RequestKeyboardLock(content::WebContents* web_contents,
bool esc_key_locked) override;
void CancelKeyboardLockRequest(content::WebContents* web_contents) override;