feat: add support for HIDDevice.forget() (#34210)
* feat: add support for HIDDevice.forget() * chore: remove whitespace * chore: use `SetGetter` to serialize the render_frame_host Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> * fixup chore: use `SetGetter` to serialize the render_frame_host * fixup after rebase * fixup for crash on navigator.serial.getPorts() * fixup for lint Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
This commit is contained in:
parent
df9383cb3c
commit
ba573f5583
15 changed files with 359 additions and 114 deletions
|
@ -68,6 +68,10 @@ class WebContentsPermissionHelper
|
|||
const url::Origin& origin,
|
||||
base::Value device,
|
||||
content::RenderFrameHost* render_frame_host) const;
|
||||
void RevokeHIDDevicePermission(
|
||||
const url::Origin& origin,
|
||||
base::Value device,
|
||||
content::RenderFrameHost* render_frame_host) const;
|
||||
|
||||
private:
|
||||
explicit WebContentsPermissionHelper(content::WebContents* web_contents);
|
||||
|
@ -91,6 +95,12 @@ class WebContentsPermissionHelper
|
|||
const base::Value* device,
|
||||
content::RenderFrameHost* render_frame_host) const;
|
||||
|
||||
void RevokeDevicePermission(
|
||||
blink::PermissionType permission,
|
||||
const url::Origin& origin,
|
||||
const base::Value* device,
|
||||
content::RenderFrameHost* render_frame_host) const;
|
||||
|
||||
// TODO(clavin): refactor to use the WebContents provided by the
|
||||
// WebContentsUserData base class instead of storing a duplicate ref
|
||||
content::WebContents* web_contents_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue