fix: WebUSB should not crash when using in-memory partitions (#42347)

This commit is contained in:
Shelley Vohr 2024-06-04 15:24:08 +02:00 committed by GitHub
parent b74d3e14b0
commit 39c984e23a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 68 additions and 14 deletions

View file

@ -56,10 +56,11 @@ class ElectronUsbDelegate : public content::UsbDelegate {
const device::mojom::UsbDeviceInfo* GetDeviceInfo(
content::BrowserContext* browser_context,
const std::string& guid) override;
bool HasDevicePermission(content::BrowserContext* browser_context,
content::RenderFrameHost* frame,
const url::Origin& origin,
const device::mojom::UsbDeviceInfo& device) override;
bool HasDevicePermission(
content::BrowserContext* browser_context,
content::RenderFrameHost* frame,
const url::Origin& origin,
const device::mojom::UsbDeviceInfo& device_info) override;
void GetDevices(
content::BrowserContext* browser_context,
blink::mojom::WebUsbService::GetDevicesCallback callback) override;