6aece4a83d
* feat: add support for WebHID * Apply suggestions from code review Co-authored-by: Jeremy Rose <jeremya@chromium.org> * Address review feedback * Address review feedback * chore: clear granted_devices on navigation Also added test to verify devices get cleared * fixup testing for device clear * make sure navigator.hid.getDevices is run on correct frame * clear granted devices on RenderFrameHost deletion/change * manage device permissions per RenderFrameHost This change makes sure we don't clear device permission prematurely due to child frame navigation * Update shell/browser/api/electron_api_web_contents.cc Co-authored-by: Jeremy Rose <jeremya@chromium.org> * apply review feedback from @zcbenz * Match upstream ObjectMap This change matches what ObjectPermissionContextBase uses to cache object permissions: https://source.chromium.org/chromium/chromium/src/+/main:components/permissions/object_permission_context_base.h;l=52;drc=8f95b5eab2797a3e26bba299f3b0df85bfc98bf5;bpv=1;bpt=0 The main reason for this was to resolve this crash on Win x64: ok 2 WebContentsView doesn't crash when GCed during allocation Received fatal exception EXCEPTION_ACCESS_VIOLATION Backtrace: gin::WrappableBase::SecondWeakCallback [0x00007FF6F2AFA005+133] (o:\gin\wrappable.cc:53) v8::internal::GlobalHandles::InvokeSecondPassPhantomCallbacks [0x00007FF6F028F9AB+171] (o:\v8\src\handles\global-handles.cc:1400) v8::internal::GlobalHandles::InvokeSecondPassPhantomCallbacksFromTask [0x00007FF6F028F867+391] (o:\v8\src\handles\global-handles.cc:1387) node::PerIsolatePlatformData::RunForegroundTask [0x00007FF6F3B4D065+317] (o:\third_party\electron_node\src\node_platform.cc:415) node::PerIsolatePlatformData::FlushForegroundTasksInternal [0x00007FF6F3B4C424+776] (o:\third_party\electron_node\src\node_platform.cc:479) uv_run [0x00007FF6F2DDD07C+492] (o:\third_party\electron_node\deps\uv\src\win\core.c:609) electron::NodeBindings::UvRunOnce [0x00007FF6EEE1E036+294] (o:\electron\shell\common\node_bindings.cc:631) base::TaskAnnotator::RunTask [0x00007FF6F2318A19+457] (o:\base\task\common\task_annotator.cc:178) base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl [0x00007FF6F2E6F553+963] (o:\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:361) base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork [0x00007FF6F2E6EC69+137] (o:\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:266) base::MessagePumpForUI::DoRunLoop [0x00007FF6F235AA58+216] (o:\base\message_loop\message_pump_win.cc:221) base::MessagePumpWin::Run [0x00007FF6F235A01A+106] (o:\base\message_loop\message_pump_win.cc:79) base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run [0x00007FF6F2E702DA+682] (o:\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:470) base::RunLoop::Run [0x00007FF6F22F95BA+842] (o:\base\run_loop.cc:136) content::BrowserMainLoop::RunMainMessageLoop [0x00007FF6F14423CC+208] (o:\content\browser\browser_main_loop.cc:990) content::BrowserMainRunnerImpl::Run [0x00007FF6F144402F+143] (o:\content\browser\browser_main_runner_impl.cc:153) content::BrowserMain [0x00007FF6F143F911+257] (o:\content\browser\browser_main.cc:49) content::RunBrowserProcessMain [0x00007FF6EFFA7D18+112] (o:\content\app\content_main_runner_impl.cc:608) content::ContentMainRunnerImpl::RunBrowser [0x00007FF6EFFA8CF4+1220] (o:\content\app\content_main_runner_impl.cc:1104) content::ContentMainRunnerImpl::Run [0x00007FF6EFFA87C9+393] (o:\content\app\content_main_runner_impl.cc:971) content::RunContentProcess [0x00007FF6EFFA73BD+733] (o:\content\app\content_main.cc:394) content::ContentMain [0x00007FF6EFFA79E1+54] (o:\content\app\content_main.cc:422) wWinMain [0x00007FF6EECA1535+889] (o:\electron\shell\app\electron_main.cc:291) __scrt_common_main_seh [0x00007FF6F6F88482+262] (d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288) BaseThreadInitThunk [0x00007FFEC0087034+20] RtlUserThreadStart [0x00007FFEC1F02651+33] ✗ Electron tests failed with code 0xc0000005. Co-authored-by: Jeremy Rose <jeremya@chromium.org>
337 lines
12 KiB
Text
337 lines
12 KiB
Text
# THIS FILE IS AUTO-GENERATED, PLEASE DO NOT EDIT BY HAND
|
|
auto_filenames = {
|
|
api_docs = [
|
|
"docs/api/accelerator.md",
|
|
"docs/api/app.md",
|
|
"docs/api/auto-updater.md",
|
|
"docs/api/browser-view.md",
|
|
"docs/api/browser-window-proxy.md",
|
|
"docs/api/browser-window.md",
|
|
"docs/api/client-request.md",
|
|
"docs/api/clipboard.md",
|
|
"docs/api/command-line-switches.md",
|
|
"docs/api/command-line.md",
|
|
"docs/api/content-tracing.md",
|
|
"docs/api/context-bridge.md",
|
|
"docs/api/cookies.md",
|
|
"docs/api/crash-reporter.md",
|
|
"docs/api/debugger.md",
|
|
"docs/api/desktop-capturer.md",
|
|
"docs/api/dialog.md",
|
|
"docs/api/dock.md",
|
|
"docs/api/download-item.md",
|
|
"docs/api/environment-variables.md",
|
|
"docs/api/extensions.md",
|
|
"docs/api/file-object.md",
|
|
"docs/api/frameless-window.md",
|
|
"docs/api/global-shortcut.md",
|
|
"docs/api/in-app-purchase.md",
|
|
"docs/api/incoming-message.md",
|
|
"docs/api/ipc-main.md",
|
|
"docs/api/ipc-renderer.md",
|
|
"docs/api/menu-item.md",
|
|
"docs/api/menu.md",
|
|
"docs/api/message-channel-main.md",
|
|
"docs/api/message-port-main.md",
|
|
"docs/api/native-image.md",
|
|
"docs/api/native-theme.md",
|
|
"docs/api/net-log.md",
|
|
"docs/api/net.md",
|
|
"docs/api/notification.md",
|
|
"docs/api/power-monitor.md",
|
|
"docs/api/power-save-blocker.md",
|
|
"docs/api/process.md",
|
|
"docs/api/protocol.md",
|
|
"docs/api/safe-storage.md",
|
|
"docs/api/screen.md",
|
|
"docs/api/service-workers.md",
|
|
"docs/api/session.md",
|
|
"docs/api/share-menu.md",
|
|
"docs/api/shell.md",
|
|
"docs/api/structures",
|
|
"docs/api/synopsis.md",
|
|
"docs/api/system-preferences.md",
|
|
"docs/api/touch-bar-button.md",
|
|
"docs/api/touch-bar-color-picker.md",
|
|
"docs/api/touch-bar-group.md",
|
|
"docs/api/touch-bar-label.md",
|
|
"docs/api/touch-bar-other-items-proxy.md",
|
|
"docs/api/touch-bar-popover.md",
|
|
"docs/api/touch-bar-scrubber.md",
|
|
"docs/api/touch-bar-segmented-control.md",
|
|
"docs/api/touch-bar-slider.md",
|
|
"docs/api/touch-bar-spacer.md",
|
|
"docs/api/touch-bar.md",
|
|
"docs/api/tray.md",
|
|
"docs/api/web-contents.md",
|
|
"docs/api/web-frame-main.md",
|
|
"docs/api/web-frame.md",
|
|
"docs/api/web-request.md",
|
|
"docs/api/webview-tag.md",
|
|
"docs/api/window-open.md",
|
|
"docs/api/structures/bluetooth-device.md",
|
|
"docs/api/structures/certificate-principal.md",
|
|
"docs/api/structures/certificate.md",
|
|
"docs/api/structures/cookie.md",
|
|
"docs/api/structures/cpu-usage.md",
|
|
"docs/api/structures/crash-report.md",
|
|
"docs/api/structures/custom-scheme.md",
|
|
"docs/api/structures/desktop-capturer-source.md",
|
|
"docs/api/structures/display.md",
|
|
"docs/api/structures/event.md",
|
|
"docs/api/structures/extension-info.md",
|
|
"docs/api/structures/extension.md",
|
|
"docs/api/structures/file-filter.md",
|
|
"docs/api/structures/file-path-with-headers.md",
|
|
"docs/api/structures/gpu-feature-status.md",
|
|
"docs/api/structures/hid-device.md",
|
|
"docs/api/structures/input-event.md",
|
|
"docs/api/structures/io-counters.md",
|
|
"docs/api/structures/ipc-main-event.md",
|
|
"docs/api/structures/ipc-main-invoke-event.md",
|
|
"docs/api/structures/ipc-renderer-event.md",
|
|
"docs/api/structures/jump-list-category.md",
|
|
"docs/api/structures/jump-list-item.md",
|
|
"docs/api/structures/keyboard-event.md",
|
|
"docs/api/structures/keyboard-input-event.md",
|
|
"docs/api/structures/memory-info.md",
|
|
"docs/api/structures/memory-usage-details.md",
|
|
"docs/api/structures/mime-typed-buffer.md",
|
|
"docs/api/structures/mouse-input-event.md",
|
|
"docs/api/structures/mouse-wheel-input-event.md",
|
|
"docs/api/structures/new-window-web-contents-event.md",
|
|
"docs/api/structures/notification-action.md",
|
|
"docs/api/structures/notification-response.md",
|
|
"docs/api/structures/point.md",
|
|
"docs/api/structures/post-body.md",
|
|
"docs/api/structures/printer-info.md",
|
|
"docs/api/structures/process-memory-info.md",
|
|
"docs/api/structures/process-metric.md",
|
|
"docs/api/structures/product.md",
|
|
"docs/api/structures/protocol-request.md",
|
|
"docs/api/structures/protocol-response-upload-data.md",
|
|
"docs/api/structures/protocol-response.md",
|
|
"docs/api/structures/rectangle.md",
|
|
"docs/api/structures/referrer.md",
|
|
"docs/api/structures/scrubber-item.md",
|
|
"docs/api/structures/segmented-control-segment.md",
|
|
"docs/api/structures/serial-port.md",
|
|
"docs/api/structures/service-worker-info.md",
|
|
"docs/api/structures/shared-worker-info.md",
|
|
"docs/api/structures/sharing-item.md",
|
|
"docs/api/structures/shortcut-details.md",
|
|
"docs/api/structures/size.md",
|
|
"docs/api/structures/task.md",
|
|
"docs/api/structures/thumbar-button.md",
|
|
"docs/api/structures/trace-categories-and-options.md",
|
|
"docs/api/structures/trace-config.md",
|
|
"docs/api/structures/transaction.md",
|
|
"docs/api/structures/upload-data.md",
|
|
"docs/api/structures/upload-file.md",
|
|
"docs/api/structures/upload-raw-data.md",
|
|
"docs/api/structures/user-default-types.md",
|
|
"docs/api/structures/web-request-filter.md",
|
|
"docs/api/structures/web-source.md",
|
|
]
|
|
|
|
sandbox_bundle_deps = [
|
|
"lib/common/api/deprecate.ts",
|
|
"lib/common/api/native-image.ts",
|
|
"lib/common/define-properties.ts",
|
|
"lib/common/ipc-messages.ts",
|
|
"lib/common/web-view-methods.ts",
|
|
"lib/renderer/api/context-bridge.ts",
|
|
"lib/renderer/api/crash-reporter.ts",
|
|
"lib/renderer/api/desktop-capturer.ts",
|
|
"lib/renderer/api/ipc-renderer.ts",
|
|
"lib/renderer/api/web-frame.ts",
|
|
"lib/renderer/inspector.ts",
|
|
"lib/renderer/ipc-renderer-internal-utils.ts",
|
|
"lib/renderer/ipc-renderer-internal.ts",
|
|
"lib/renderer/security-warnings.ts",
|
|
"lib/renderer/web-frame-init.ts",
|
|
"lib/renderer/web-view/guest-view-internal.ts",
|
|
"lib/renderer/web-view/web-view-attributes.ts",
|
|
"lib/renderer/web-view/web-view-constants.ts",
|
|
"lib/renderer/web-view/web-view-element.ts",
|
|
"lib/renderer/web-view/web-view-impl.ts",
|
|
"lib/renderer/web-view/web-view-init.ts",
|
|
"lib/renderer/window-setup.ts",
|
|
"lib/sandboxed_renderer/api/exports/electron.ts",
|
|
"lib/sandboxed_renderer/api/module-list.ts",
|
|
"lib/sandboxed_renderer/init.ts",
|
|
"package.json",
|
|
"tsconfig.electron.json",
|
|
"tsconfig.json",
|
|
"typings/internal-ambient.d.ts",
|
|
"typings/internal-electron.d.ts",
|
|
]
|
|
|
|
isolated_bundle_deps = [
|
|
"lib/common/web-view-methods.ts",
|
|
"lib/isolated_renderer/init.ts",
|
|
"lib/renderer/web-view/web-view-attributes.ts",
|
|
"lib/renderer/web-view/web-view-constants.ts",
|
|
"lib/renderer/web-view/web-view-element.ts",
|
|
"lib/renderer/web-view/web-view-impl.ts",
|
|
"package.json",
|
|
"tsconfig.electron.json",
|
|
"tsconfig.json",
|
|
"typings/internal-ambient.d.ts",
|
|
"typings/internal-electron.d.ts",
|
|
]
|
|
|
|
browser_bundle_deps = [
|
|
"lib/browser/api/app.ts",
|
|
"lib/browser/api/auto-updater.ts",
|
|
"lib/browser/api/auto-updater/auto-updater-native.ts",
|
|
"lib/browser/api/auto-updater/auto-updater-win.ts",
|
|
"lib/browser/api/auto-updater/squirrel-update-win.ts",
|
|
"lib/browser/api/base-window.ts",
|
|
"lib/browser/api/browser-view.ts",
|
|
"lib/browser/api/browser-window.ts",
|
|
"lib/browser/api/content-tracing.ts",
|
|
"lib/browser/api/crash-reporter.ts",
|
|
"lib/browser/api/desktop-capturer.ts",
|
|
"lib/browser/api/dialog.ts",
|
|
"lib/browser/api/exports/electron.ts",
|
|
"lib/browser/api/global-shortcut.ts",
|
|
"lib/browser/api/in-app-purchase.ts",
|
|
"lib/browser/api/ipc-main.ts",
|
|
"lib/browser/api/menu-item-roles.ts",
|
|
"lib/browser/api/menu-item.ts",
|
|
"lib/browser/api/menu-utils.ts",
|
|
"lib/browser/api/menu.ts",
|
|
"lib/browser/api/message-channel.ts",
|
|
"lib/browser/api/module-list.ts",
|
|
"lib/browser/api/native-theme.ts",
|
|
"lib/browser/api/net-log.ts",
|
|
"lib/browser/api/net.ts",
|
|
"lib/browser/api/notification.ts",
|
|
"lib/browser/api/power-monitor.ts",
|
|
"lib/browser/api/power-save-blocker.ts",
|
|
"lib/browser/api/protocol.ts",
|
|
"lib/browser/api/safe-storage.ts",
|
|
"lib/browser/api/screen.ts",
|
|
"lib/browser/api/session.ts",
|
|
"lib/browser/api/share-menu.ts",
|
|
"lib/browser/api/system-preferences.ts",
|
|
"lib/browser/api/touch-bar.ts",
|
|
"lib/browser/api/tray.ts",
|
|
"lib/browser/api/view.ts",
|
|
"lib/browser/api/views/image-view.ts",
|
|
"lib/browser/api/web-contents-view.ts",
|
|
"lib/browser/api/web-contents.ts",
|
|
"lib/browser/api/web-frame-main.ts",
|
|
"lib/browser/default-menu.ts",
|
|
"lib/browser/desktop-capturer.ts",
|
|
"lib/browser/devtools.ts",
|
|
"lib/browser/guest-view-manager.ts",
|
|
"lib/browser/guest-window-manager.ts",
|
|
"lib/browser/guest-window-proxy.ts",
|
|
"lib/browser/init.ts",
|
|
"lib/browser/ipc-main-impl.ts",
|
|
"lib/browser/ipc-main-internal-utils.ts",
|
|
"lib/browser/ipc-main-internal.ts",
|
|
"lib/browser/message-port-main.ts",
|
|
"lib/browser/rpc-server.ts",
|
|
"lib/common/api/clipboard.ts",
|
|
"lib/common/api/deprecate.ts",
|
|
"lib/common/api/module-list.ts",
|
|
"lib/common/api/native-image.ts",
|
|
"lib/common/api/shell.ts",
|
|
"lib/common/define-properties.ts",
|
|
"lib/common/init.ts",
|
|
"lib/common/ipc-messages.ts",
|
|
"lib/common/parse-features-string.ts",
|
|
"lib/common/reset-search-paths.ts",
|
|
"lib/common/web-view-events.ts",
|
|
"lib/common/web-view-methods.ts",
|
|
"lib/common/webpack-globals-provider.ts",
|
|
"lib/renderer/ipc-renderer-internal-utils.ts",
|
|
"lib/renderer/ipc-renderer-internal.ts",
|
|
"package.json",
|
|
"tsconfig.electron.json",
|
|
"tsconfig.json",
|
|
"typings/internal-ambient.d.ts",
|
|
"typings/internal-electron.d.ts",
|
|
]
|
|
|
|
renderer_bundle_deps = [
|
|
"lib/common/api/clipboard.ts",
|
|
"lib/common/api/deprecate.ts",
|
|
"lib/common/api/module-list.ts",
|
|
"lib/common/api/native-image.ts",
|
|
"lib/common/api/shell.ts",
|
|
"lib/common/define-properties.ts",
|
|
"lib/common/init.ts",
|
|
"lib/common/ipc-messages.ts",
|
|
"lib/common/reset-search-paths.ts",
|
|
"lib/common/web-view-methods.ts",
|
|
"lib/common/webpack-provider.ts",
|
|
"lib/renderer/api/context-bridge.ts",
|
|
"lib/renderer/api/crash-reporter.ts",
|
|
"lib/renderer/api/desktop-capturer.ts",
|
|
"lib/renderer/api/exports/electron.ts",
|
|
"lib/renderer/api/ipc-renderer.ts",
|
|
"lib/renderer/api/module-list.ts",
|
|
"lib/renderer/api/web-frame.ts",
|
|
"lib/renderer/init.ts",
|
|
"lib/renderer/inspector.ts",
|
|
"lib/renderer/ipc-renderer-internal-utils.ts",
|
|
"lib/renderer/ipc-renderer-internal.ts",
|
|
"lib/renderer/security-warnings.ts",
|
|
"lib/renderer/web-frame-init.ts",
|
|
"lib/renderer/web-view/guest-view-internal.ts",
|
|
"lib/renderer/web-view/web-view-attributes.ts",
|
|
"lib/renderer/web-view/web-view-constants.ts",
|
|
"lib/renderer/web-view/web-view-element.ts",
|
|
"lib/renderer/web-view/web-view-impl.ts",
|
|
"lib/renderer/web-view/web-view-init.ts",
|
|
"lib/renderer/window-setup.ts",
|
|
"package.json",
|
|
"tsconfig.electron.json",
|
|
"tsconfig.json",
|
|
"typings/internal-ambient.d.ts",
|
|
"typings/internal-electron.d.ts",
|
|
]
|
|
|
|
worker_bundle_deps = [
|
|
"lib/common/api/clipboard.ts",
|
|
"lib/common/api/deprecate.ts",
|
|
"lib/common/api/module-list.ts",
|
|
"lib/common/api/native-image.ts",
|
|
"lib/common/api/shell.ts",
|
|
"lib/common/define-properties.ts",
|
|
"lib/common/init.ts",
|
|
"lib/common/ipc-messages.ts",
|
|
"lib/common/reset-search-paths.ts",
|
|
"lib/common/webpack-provider.ts",
|
|
"lib/renderer/api/context-bridge.ts",
|
|
"lib/renderer/api/crash-reporter.ts",
|
|
"lib/renderer/api/desktop-capturer.ts",
|
|
"lib/renderer/api/exports/electron.ts",
|
|
"lib/renderer/api/ipc-renderer.ts",
|
|
"lib/renderer/api/module-list.ts",
|
|
"lib/renderer/api/web-frame.ts",
|
|
"lib/renderer/ipc-renderer-internal-utils.ts",
|
|
"lib/renderer/ipc-renderer-internal.ts",
|
|
"lib/worker/init.ts",
|
|
"package.json",
|
|
"tsconfig.electron.json",
|
|
"tsconfig.json",
|
|
"typings/internal-ambient.d.ts",
|
|
"typings/internal-electron.d.ts",
|
|
]
|
|
|
|
asar_bundle_deps = [
|
|
"lib/asar/fs-wrapper.ts",
|
|
"lib/asar/init.ts",
|
|
"lib/common/webpack-provider.ts",
|
|
"package.json",
|
|
"tsconfig.electron.json",
|
|
"tsconfig.json",
|
|
"typings/internal-ambient.d.ts",
|
|
"typings/internal-electron.d.ts",
|
|
]
|
|
}
|