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

@ -31,7 +31,8 @@ class WebContentsPermissionHelper
OPEN_EXTERNAL,
SERIAL,
HID,
USB
USB,
KEYBOARD_LOCK
};
// Asynchronous Requests
@ -44,6 +45,9 @@ class WebContentsPermissionHelper
bool last_unlocked_by_target,
base::OnceCallback<void(content::WebContents*, bool, bool, bool)>
callback);
void RequestKeyboardLockPermission(
bool esc_key_locked,
base::OnceCallback<void(content::WebContents*, bool, bool)> callback);
void RequestWebNotificationPermission(
content::RenderFrameHost* requesting_frame,
base::OnceCallback<void(bool)> callback);