Граф коммитов

633 Коммитов

Автор SHA1 Сообщение Дата
George Xu ba8ad4716b
feat: expose system preferences to utility process (#42203)
* chore: expose  system preferences to utility process

* chore: add tests, doc changes and module-list update

* relative link

* use @

* fix test

* chore: disable linux test

* kick

* noop on windows utility process
2024-06-20 11:15:57 -04:00
Shelley Vohr 37608933ae
fix: fetch-dependent interfaces in Web Workers (#42579) 2024-06-20 11:01:50 -04:00
Shelley Vohr 8e8ea3ee8b
fix: MessagePort closing unexpectedly with non-cloneable objects (#42535)
* fix: MessagePort closing unexpectedly with non-cloneable objects

* fix: handle serialization failure in parentPort
2024-06-19 11:27:07 +02:00
Samuel Attard e19754d7fd
test: add tests for electron fuses (#42129)
* spec: add tests for electron fuses

* spec: fix tests for windows

* spec: handle weird crash codes on win32

* spec: disable fuse tests on arm64 windows
2024-05-13 10:48:26 -07:00
Shelley Vohr 344aba0838
feat: implement File System API support (#41419) 2024-04-10 22:06:47 +02:00
Calvin 3eb94b72ba
feat: Options parameter for `Session.clearData` API (#41355)
* feat: Options parameter for `Session.clearData` API

* Consolidate & curate data type categories

* Update docs for better typing

* off-by-one typo

* refactor to use `std::shared_ptr` instead of `base::RefCounted`

* fix compile errors

* std::enable_shared_from_this didn't work 🤷

* Refine docs with defaults
2024-04-01 12:09:01 -04:00
Shelley Vohr 7032c0d03c
test: add test and `api_feature` definition for `chrome.scripting.globalParams` (#41685)
chore: add test and api_feature for chrome.scripting.globalParams
2024-03-26 12:33:47 +01:00
Shelley Vohr b02918883f
fix: support recursive readdir in Asar files (#41582) 2024-03-19 11:10:14 +01:00
electron-roller[bot] 04df5ce492
chore: bump chromium to 124.0.6323.0 (main) (#41412)
* chore: bump chromium in DEPS to 124.0.6315.0

* chore: update patches

* 5279678: Stream AIDA responses

https://chromium-review.googlesource.com/c/chromium/src/+/5279678

* 5276439: Remove non_network_url_loader_factory_remotes_

https://chromium-review.googlesource.com/c/chromium/src/+/5276439

* 5310165: Add DevTools API to show search results

https://chromium-review.googlesource.com/c/chromium/src/+/5310165

* chore: bump chromium in DEPS to 124.0.6317.0

* chore: update patches

* Remove Setup.Install.CumulativeDiskUsage2 and supporting code

https://chromium-review.googlesource.com/c/chromium/src/+/5314269

* browser: Make cmd line non-const in process singleton callback

https://chromium-review.googlesource.com/c/chromium/src/+/5311256

* chore: bump chromium in DEPS to 124.0.6319.0

* chore: bump chromium in DEPS to 124.0.6321.0

* chore: bump chromium in DEPS to 124.0.6323.0

* 5318335: Roll src/third_party/boringssl/src 23824fa0f..4fe29ebc7

https://chromium-review.googlesource.com/c/chromium/src/+/5318335

* 5318051: [CBE Watermarking] Hoist `watermark_view` to a member variable.

https://chromium-review.googlesource.com/c/chromium/src/+/5318051

* chore: fixup patch indices

* 4946553: Delegate HID permission to Chrome App in webview

https://chromium-review.googlesource.com/c/chromium/src/+/4946553

* 5310001: DevTools UI binding for reporting client events to AIDA

https://chromium-review.googlesource.com/c/chromium/src/+/5310001

* [libc++] Refactor the predicate taking variant of `__cxx_atomic_wait`

* chore: fix browser_view patch harder

* 5293937: Reland "[gUM] Use preferred device if more than one is eligible"

https://chromium-review.googlesource.com/c/chromium/src/+/5293937

* fix: filter {video|audio} devices by eligible device id

* 5267921: enable speak content under the pointer on PWA and WV2

https://chromium-review.googlesource.com/c/chromium/src/+/5267921

* 5310195: heap: Remove Blink's GCTaskRunner

https://chromium-review.googlesource.com/c/chromium/src/+/5310195

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-02-29 10:31:13 +01:00
Cheng Zhao db2bf1a0d1
fix: apply module search paths restriction on worker and child process (#41118) 2024-01-26 17:29:04 +09:00
Shelley Vohr 6803624576
fix: check for Node.js-created module when `contextIsolation` disabled (#40993) 2024-01-16 14:29:00 +01:00
Brandon Fowler 5086071294
feat: add `transparent` webpreference to webview (#40301)
* feat: add transparent option to WebContents

* feat: add transparent attribute to webview

* test: add tests for webview transparent attribute

* docs: add transparent attribute to webview docs

* fix: run tests on macOS only

* refactor: remove unneeded html tag

* fix: only apply transparent option to guests

* refactor: correct comment

* refactor: use opaque instead

Retains current webview behaviour by default.

* fix: correct variable name to guest_opaque_

* refactor: use transparent webpreference

* docs: remove unused web preference

* fix: uncomment condition for transparency test

* docs: converted to list format and linked to MDN

* fix: make webviews transparent by default again

* fix: rebase error

---------

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2024-01-05 13:00:27 +09:00
Devraj Mehta 8c71e2adc9
feat: add net module to utility process (#40017)
* chore: initial prototype of net api from utility process

* chore: update url loader to work on both browser and utility processes

* chore: add net files to utility process bundle

* chore: re-add app ready check but only on main process

* chore: replace browser thread dcheck's with sequence checker

* refactor: move url loader from browser to common

* refactor: move net-client-request.ts from browser to common

* docs: add utility process to net api docs

* refactor: move net module app ready check to browser only

* refactor: switch import from main to common after moving to common

* test: add basic net module test for utility process

* refactor: switch browser pid with utility pid

* refactor: move electron_api_net from browser to common

* chore: add fetch to utility net module

* chore: add isOnline and online to utility net module

* refactor: move net spec helpers into helper file

* refactor: break apart net module tests

Adds two additional net module test files: `api-net-session-spec.ts` for
tests that depend on a session being available (aka depend on running on
the main process) and `api-net-custom-protocols-spec.ts` for custom
protocol tests. This enables running `api-net-spec.ts` in the utility
process.

* test: add utility process mocha runner to run net module tests

* docs: add utility process to net module classes

* refactor: update imports in lib/utility to use electron/utility

* chore: check browser context before using in main process

Since the browser context supplied to the SimpleURLLoaderWrapper can now
be null for use in the UtilityProcess, adding a null check for the main
process before use to get a more sensible error if something goes wrong.

Co-authored-by: Cheng Zhao <github@zcbenz.com>

* chore: remove test debugging

* chore: remove unnecessary header include

* docs: add utility process net module limitations

* test: run net module tests in utility process individually

* refactor: clean up prior utility process net tests

* chore: add resolveHost to utility process net module

* chore: replace resolve host dcheck with sequence checker

* test: add net module tests for net.resolveHost

* docs: remove utility process limitation for resolveHost

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
2024-01-04 16:20:37 -05:00
Cheng Zhao dfce1a9eb4
fix: ignore all NODE_ envs from foreign parent in node process (#40770)
* fix: ignore all NODE_ envs from foreign parent

* fix: recognize ad-hoc signed binary
2024-01-04 16:34:08 +09:00
Jeremy Rose be4e4ff11b
fix: make grant_file_protocol_extra_privileges fuse also block CORS fetches (#40801) 2024-01-02 13:06:33 -08:00
Jeremy Rose 15c6014324
feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
Cheng Zhao cb0da6ff34
fix: prevent node mode to be used as script runner by other apps (#40579) 2023-12-06 11:23:54 +09:00
Cheng Zhao 9aa73abe78
feat: enable code cache for custom protocols (#40544) 2023-12-06 11:22:41 +09:00
Shelley Vohr 10a165a9ff
fix: webview zoom level persistence on navigation (#40650) 2023-12-04 10:39:20 -05:00
Samuel Attard d6bb9b40b0
feat: add webUtils module with getPathForFile method (#38776)
* feat: add blinkUtils module with getPathForFile method

This is designed to replace the File.path augmentation
we currently have in place to allow apps to get the filesystem
path for a file that blink has a representation of.

File.path is non-standard and messes with certain websites, using
a method like this is effectively 0-cost and removes one of the final
deviations we have with web standards.

* add error

* refactor: update per PR feedback

* chore: update patches

* oops

* chore: update patches

* chore: update patches

* feat: add blinkUtils module with getPathForFile method

This is designed to replace the File.path augmentation
we currently have in place to allow apps to get the filesystem
path for a file that blink has a representation of.

File.path is non-standard and messes with certain websites, using
a method like this is effectively 0-cost and removes one of the final
deviations we have with web standards.

* add error

* refactor: update per PR feedback

* chore: update patches

* oops

* chore: update patches

* chore: update patches

* chore: update patches

* fix: provide isolate to WebBlob::FromV8Value

* chore: add tests

* build: fix depshash mismatch on arm64 macOS

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2023-11-20 15:59:36 -08:00
Shelley Vohr 7981d955b8
fix: `chrome.action` API registration (#40500) 2023-11-13 08:27:18 +01:00
Samuel Attard 83892ab995
refactor: ensure IpcRenderer is not bridgable (#40330)
* refactor: ensure IpcRenderer is not bridgable

* chore: add notes to breaking-changes

* spec: fix test that bridged ipcrenderer
2023-10-31 17:29:40 -04:00
Shelley Vohr fcdd5cba71
fix: `navigator.keyboard.lock()` fullscreen exit handling (#40365)
fix: navigator.keyboard.lock() fullscreen exit handling
2023-10-31 11:59:39 -04:00
Shelley Vohr 5643e86956
chore: update extensions url handling to match upstream (#40038)
- https://chromium-review.googlesource.com/c/chromium/src/+/4772028
- https://chromium-review.googlesource.com/c/chromium/src/+/4264656
- https://chromium-review.googlesource.com/c/chromium/src/+/4712150
2023-10-02 10:35:00 +02:00
Samuel Attard 371e83a8d2
fix: support esm entrypoint to utility process (#40047) 2023-09-29 14:38:37 -07:00
Shelley Vohr ec9c8476fe
fix: `keyCode`s being incorrectly converted in `webContents.sendInputEvent()` (#39776)
fix: sendInputEvent keyCodes being incorrectly converted
2023-09-12 11:28:45 +02:00
Samuel Attard 5bff0fe342
feat: add new ElectronSquirrelPreventDowngrades flag (#38625)
* sketch

* feat: add new ElectronSquirrelPreventDowngrades flag

* test: remove only

* chore: fix lint
2023-09-11 11:54:51 -07:00
Milan Burda 0b0707145b
refactor: replace `.forEach()` with `for-of` (#39691)
* refactor: replace `.forEach()` with `for-of`

* refactor docs/fiddles/features/web-hid/renderer.js
2023-08-31 23:36:43 +09:00
Samuel Attard ac031bf8de
feat: I guess it's esm (#37535)
* fix: allow ESM loads from within ASAR files

* fix: ensure that ESM entry points finish loading before app ready

* fix: allow loading ESM entrypoints via default_app

* fix: allow ESM loading for renderer preloads

* docs: document current known limitations of esm

* chore: add patches to support blending esm handlers

* refactor: use SetDefersLoading instead of JoinAppCode in renderers

Blink has it's own event loop so pumping the uv loop in the renderer is not enough, luckily in blink we can suspend the loading of the frame while we do additional work.

* chore: add patch to expose SetDefersLoading

* fix: use fileURLToPath instead of pathname

* chore: update per PR feedback

* fix: fs.exists/existsSync should never throw

* fix: convert path to file url before importing

* fix: oops

* fix: oops

* Update docs/tutorial/esm-limitations.md

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* windows...

* windows...

* chore: update patches

* spec: fix tests and document empty body edge case

* Apply suggestions from code review

Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* spec: add tests for esm

* spec: windows

* chore: update per PR feedback

* chore: update patches

* Update shell/common/node_bindings.h

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* chore: update patches

* rebase

* use cjs loader by default for preload scripts

* chore: fix lint

* chore: update patches

* chore: update patches

* chore: fix patches

* build: debug depshash

* ?

* Revert "build: debug depshash"

This reverts commit 0de82523fb.

* chore: allow electron as builtin protocol in esm loader

* Revert "Revert "build: debug depshash""

This reverts commit ff86b1243c.

* chore: fix esm doc

* chore: update node patches

---------

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
2023-08-30 17:38:07 -07:00
Tomasz f30fbebb98
fix: promise resolved to early when browser initiated in-page navigation v2 (#39597) 2023-08-28 12:37:28 -04:00
Shelley Vohr f0ad357af2
feat: support `chrome.scripting` extension APIs (#39395)
feat: support chrome.scripting extension  APIs
2023-08-28 10:39:28 -04:00
Milan Burda 5078cae861
chore: remove deprecated `ipcRenderer.sendTo()` (#39087)
chore: remove deprecated ipcRenderer.sendTo()
2023-08-28 10:29:27 -04:00
Shelley Vohr f369b144d6
feat: add more extensions manifest key options (#39599)
feat: add more manifest key options
2023-08-28 10:02:22 -04:00
Shelley Vohr e1d63794e5
fix: `chrome.tabs` 'url' and 'title' are privileged information (#39595)
fix: tabs url and title are privileged information
2023-08-22 14:56:58 +02:00
Milan Burda 3102a257af
feat: expose dummy module.exports to the sandboxed preload scripts (#39484) 2023-08-22 13:43:08 +09:00
Robo bee5d94886
feat: support dns-result-order Node.js cli flag (#39376)
* feat: support dns-result-order Node.js cli flag

* chore: update docs

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* chore: remove patch

---------

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2023-08-15 12:19:45 +02:00
Shelley Vohr 117d5310f5
revert: promise resolved too early when browser initiates in-page navigation (#39481)
This reverts commit a0effaf9b8.
2023-08-14 13:13:15 +09:00
Tomasz a0effaf9b8
fix: promise resolved to early when browser initiated in-page navigation (#39260) 2023-08-09 16:06:39 +02:00
Shelley Vohr d9329042e2
feat: add support for `chrome.tabs.query` (#39330)
* feat: add support for tabs.query

* fix: scope to webContents in current session

* test: add test for session behavior
2023-08-09 14:47:19 +02:00
Shelley Vohr 67523a47b4
fix: `chrome.tabs.update` return value (#39365)
fix: chrome.tabs.update return value
2023-08-07 10:03:45 +02:00
Shelley Vohr 6d0e8044eb
fix: update `chrome.tabs` for Manifest v3 (#39317) 2023-08-03 18:34:02 +02:00
Shelley Vohr f8b05bc127
feat: support `minimum_chrome_version` manifest key (#39256)
feat: support minimum_chrome_version extension key
2023-08-03 11:38:31 -04:00
Shelley Vohr 303b707fbf
fix: update `chrome.i18n` for Manifest v3 (#39291)
fix: update chrome.i18n for Manifest v3
2023-08-02 11:02:16 +02:00
Shelley Vohr c8f7a0e052
fix: Chrome Extensions service worker host registration (#39290) 2023-08-01 15:04:38 +09:00
Shelley Vohr 6df392162f
fix: `pageVisibility` state when `backgroundThrottling` disabled (#39223)
fix: pageVisibility state when backgroundThrottling disabled
2023-07-28 10:48:25 +02:00
Milan Burda c9bae5da8e
refactor: use optional catch binding (#39232) 2023-07-27 10:53:45 -04:00
Shelley Vohr 1231f0a734
docs: document `idleDetector` permissions (#39180)
doc: document idleDetector permissions
2023-07-24 14:57:41 -04:00
Milan Burda 3df6d337f3
feat: add `senderIsMainFrame` to messages sent via `ipcRenderer.sendTo()` (#38868)
* feat: add isMainFrame to events emitted via ipcRenderer.sendTo()

* chore: rename isMainFrame to senderIsMainFrame
2023-07-24 14:27:30 +02:00
Robo 34e7c3696a
feat: expose safestorage backend information on linux (#38873)
* feat: expose safestorage backend information on linux

* Remove gnome-keyring

Refs https://chromium-review.googlesource.com/c/chromium/src/+/4609704
2023-07-13 11:14:33 +02:00
Shelley Vohr c7a64ab994
fix: webview crash when removing in close event (#38996) 2023-07-06 10:20:34 +02:00