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

189 Коммитов

Автор SHA1 Сообщение Дата
Milan Burda f66d4c7ee0
fix: make sure classes in lib correctly implement Electron interfaces (#40291) 2023-10-25 14:02:15 -04:00
Milan Burda 2c88626b51
chore: revert deprecate as an internal module (#40146)
Revert "chore: restore deprecate as an internal module (#40124)"

This reverts commit 737e3de3fa.
2023-10-10 11:50:47 -04:00
Milan Burda 737e3de3fa
chore: restore deprecate as an internal module (#40124)
* Revert "refactor: don't expose deprecate as an internal module (#35311)"

This reverts commit 8424779906.

* check crashed event warnings
2023-10-09 08:55:16 +09:00
Milan Burda d75a852743
refactor: use type enum in file stats for asar archive (#39889) 2023-09-25 13:17:24 +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
Samuel Attard 16aec702b4
fix: ensure app load is limited to real asar files when appropriate (#39788) 2023-09-11 11:51:14 -07:00
Milan Burda e71a56d11e
refactor: const Module = require('module') as NodeJS.ModuleInternal; (#38757)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-09-06 18:04:25 -04:00
David Sanders c96bb9958f
chore: remove deprecated `webContents.getPrinters()` (#39663) 2023-09-05 10:16:41 +02:00
Milan Burda d76a35afe4
test: remove a few casts to any (#39713) 2023-09-05 11:22:41 +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
Milan Burda 5078cae861
chore: remove deprecated `ipcRenderer.sendTo()` (#39087)
chore: remove deprecated ipcRenderer.sendTo()
2023-08-28 10:29:27 -04:00
Samuel Attard 499d893040
feat: add support for keyboard initialized menu popup (#38903)
* feat: add support for keyboard initialized menu popup

* Update docs/api/menu.md

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

* fix: add patch to chromium for keyboard accessibility menu behavior

* refactor: s/initiatedByKeyboard/sourceType

* fix: ignore initial mouse event to retain keyboard initiated focus

* Update docs/api/menu.md

Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>

---------

Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
2023-06-29 15:54:06 -07:00
Milan Burda e37111edcc
build: remove enable_osr build flag (#38703)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-06-13 14:48:53 -04:00
Shelley Vohr c0d9764de9
fix: `webContents.print` parameter validation error (#38614) 2023-06-09 21:41:01 +02:00
Milan Burda 05d39d8313
build: remove enable_run_as_node build flag (#38413)
* feat: remove enable_run_as_node flag

* drop features.isRunAsNodeEnabled()

* use IsEnvSet() helper in electron_main_linux.cc

* cleanup [[maybe_unused]]

---------

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-06-08 16:40:08 -04:00
Milan Burda 0294debc31
build: remove enable_picture_in_picture build flag (#38620)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-06-07 23:56:31 -07:00
Milan Burda 185180a8e2
refactor: tweak bindings in typings/internal-ambient.d.ts for readability (#38411)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-05-25 14:53:23 +02:00
Milan Burda 06cc9caeaa
build: remove enable_desktop_capturer flag (#38412)
feat: remove enable_desktop_capturer flag

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-05-24 15:32:31 -04:00
Milan Burda a043a60b89
refactor: cleanup global variable declarations (#38410)
refactor: eliminate duplicate isolatedApi typing

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-05-24 20:01:07 +02:00
Milan Burda b6ef4a3929
build: remove unused enable_tts build flag (#38420)
chore: remove unused enable_tts build flag

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-05-24 10:18:43 +02:00
Jeremy Rose fda8ea9277
feat: add protocol.handle (#36674) 2023-03-27 10:00:55 -07:00
George Joseph e0c348a2f8
feat: Allow usage of an absolute path for partitions used in a session (#37604)
* Allow an absolute path to be used for creating sessions

Allows an absolute path to be used for creating sessions
by adding the session.fromPath() API.

* Fixup! Clarify that an emptry string is not permitted as a parameter to fromPath()
2023-03-20 10:34:49 -04:00
Jeremy Rose 872d1fe05a
feat: implement net.fetch (#36733) 2023-02-20 12:57:38 -08:00
Milan Burda 0a5e634736
test: rename & split internal module tests (#37318) 2023-02-17 10:14:40 +01:00
Milan Burda ea848bc1c5
test: use webContents.create() in type-safe way (#37281)
test: use (webContents as typeof ElectronInternal.WebContents).create()

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-02-16 15:41:41 +01:00
Jeremy Rose 71944f2c3b
refactor: simplify events (#37099) 2023-02-13 13:39:18 -08:00
Jeremy Rose 8f23b1527b
fix: use chrome headers in net.request for everything except cookie (#36666) 2022-12-21 14:53:29 -08:00
Robo da0fd286b4
feat: UtilityProcess API (#34980)
* chore: initial scaffolding

* chore: implement interface and docs

* chore: address code style review

* fix: cleanup of utility process on shutdown

* chore: simplify NodeBindings::CreateEnvironment

* chore: rename disableLibraryValidation => allowLoadingUnsignedLibraries

* chore: implement process.parentPort

* chore(posix): implement stdio pipe interface

* chore(win): implement stdio interface

* chore: reenable SetNodeOptions for utility process

* chore: add specs

* chore: fix lint

* fix: update kill API

* fix: update process.parentPort API

* fix: exit event

* docs: update exit event

* fix: tests on linux

* chore: expand on some comments

* fix: shutdown of pipe reader

Avoid logging since it is always the case that reader end of
pipe will terminate after the child process.

* fix: remove exit code check for crash spec

* fix: rm PR_SET_NO_NEW_PRIVS for unsandbox utility process

* chore: fix incorrect rebase

* fix: address review feedback

* chore: rename utility_process -> utility

* chore: update docs

* chore: cleanup c++ implemantation

* fix: leak in NodeServiceHost impl

* chore: minor cleanup

* chore: cleanup JS implementation

* chore: flip default stdio to inherit

* fix: some api improvements

* Support cwd option
* Remove path restriction for modulePath
* Rewire impl for env support

* fix: add tests for cwd and env option

* chore: alt impl for reading stdio handles

* chore: support message queuing

* chore: fix lint

* chore: new UtilityProcess => utilityProcess.fork

* fix: support for uncaught exception exits

* chore: remove process.execArgv as default

* fix: windows build

* fix: style changes

* fix: docs and style changes

* chore: update patches

* spec: disable flaky test on win32 arm CI

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-10-19 22:49:49 -07:00
Milan Burda f62aab76b3
fix: potential exception when calling webFrameMainBinding.fromIdOrNull() (#35785)
* fix: potential exception when calling webFrameMainBinding.fromIdOrNull()

* replace try/catch in getWebFrameForEvent

Co-authored-by: Milan Burda <miburda@microsoft.com>
2022-09-24 12:19:07 -07:00
Milan Burda 8424779906
refactor: don't expose deprecate as an internal module (#35311) 2022-08-15 17:09:33 +09:00
Jeremy Rose 6d859dcd7f
feat: add WebContents.ipc (#34959) 2022-08-03 16:55:12 -07:00
Jeremy Rose 3c63f075bd
chore: remove unused WebContents._sendToFrameInternal (#35010) 2022-07-21 10:25:54 -07:00
Milan Burda d4e97483aa
refactor: only create webContents after 'will-attach-webview' (#32941) 2022-07-21 11:29:31 +02:00
Joan Xie afd08c9450
feat: Enable APNS registration + notification delivery in macOS apps (#33574) 2022-07-12 08:38:49 -07:00
Milan Burda f3f327823e
chore: move main process only accessible API bindings away from common (#34634) 2022-06-21 16:34:56 +09:00
Jeremy Rose bad8d5e08a
fix: make preload calculation identical between sandbox & non-sandboxed (#34531) 2022-06-15 13:22:28 -07:00
Michaela Laurencin 4c7c0b41c2
feat: add immersive dark mode on windows (#33624)
* feat: add immersive dark mode

* fix syntax and add header

* add me

* Update fuses.json5

* fix: redraw title bar on dark mode change

* chore: SetWindowTheme doesn't seem to be needed

* chore: separate out Win 10 dark mode implementation

* final touches

* final touches

* chore: limit Win 10 to >= 20H1 and drop fuse

* fix types

* fix lint

Co-authored-by: Micha Hanselmann <micha.hanselmann@gmail.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2022-06-14 12:27:28 -04:00
Shelley Vohr 93b39b92b5
refactor: printToPDF should be headless (#33654) 2022-05-31 08:21:25 +02:00
Calvin 594dc7e24a
chore: update node types version (#33452)
* chore: update node types version

* update express types to solve type conflict

* one more yarn.lock type bump

* update another types package to fix incompatible global declarations

* remove incompatible type magicks

* update our ambient types to match the node types

* fix test type
2022-03-28 14:37:35 -07:00
Fedor Indutny 06a00b74e8
fix: initialize asar support in worker threads (#33216)
* fix: initialize asar support in worker threads

Use `ObjectWrap` instead of gin's Wrap in `electron_api_asar.cc` because
gin isn't fully initialized (and apparently not possible to initialize
without ruining the isolate configuration and array buffer allocator) in
worker threads. In the worker thread call `setupAsarSupport` just as we
do for the main process.

* Update lib/asar/fs-wrapper.ts

Co-authored-by: Darshan Sen <raisinten@gmail.com>

* Update patches/node/worker_thread_add_asar_support.patch

Co-authored-by: Darshan Sen <raisinten@gmail.com>

* Add a test

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-03-22 20:37:55 -04:00
Jeremy Rose 4342b7ff55
chore: remove awkward semi-documented preloadURL WebPreference (#33228) 2022-03-16 16:23:41 -07:00
t57ser 41b2945ced
feat: add ability to configure if window should close when opener closes (#31314)
* feat: Added ability to configure if window should close when opener closes

* fix: check if embedder is destroyed

* fix: correctly take over closeWithOpener property

* chore: Added documentation

* Update docs/api/window-open.md

Co-authored-by: John Kleinschmidt <jkleinsc@github.com>

* chore: refactor

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

* chore: changed property name from `closeWithOpener` to `outlivesOpener`

* dummy change to kick lint

* undo above

Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2022-02-23 16:59:50 +09:00
Milan Burda db9ab80694
chore: update to latest TypeScript (#32596) 2022-01-31 20:37:40 +09:00
Milan Burda 99ee1fc0eb
fix: will-attach-webview handler modifying params.instanceId does not break <webview> (#32386) 2022-01-12 16:41:20 +09:00
Jeremy Rose d44a187d0b
feat: remove nativeWindowOpen option (#29405)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2022-01-06 09:28:03 -08:00
Charles Kerr cac871c027
Revert "refactor: only create webContents after 'will-attach-webview' (#30311)" (#31785)
This reverts commit 6e43b0bcbf.
2021-11-11 15:04:06 -05:00
Milan Burda fe7f296339
refactor: remove duplicate contextIsolation from getWebPreference() (#31730) 2021-11-08 11:57:56 -05:00
Samuel Attard 63eed52626
fix: do not trigger CSP violations when checking eval (#30991)
* fix: do not trigger CSP violations when checking eval

* Update shell/renderer/api/electron_api_web_frame.cc

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

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-10-25 14:11:24 -07:00
Darshan Sen 8f51d3e1bf
feat: add `webContents.getPrintersAsync()` (#31023)
This deprecates the synchronous and blocking `webContents.getPrinters()`
function and introduces `webContents.getPrintersAsync()`, which is
asynchronous and non-blocking.

Signed-off-by: Darshan Sen <darshan.sen@postman.com>
2021-10-25 14:16:58 -04:00
Robo 2a92d8f962
refactor: only access memory coordinator interface from browser process (#31295)
Refs https://chromium-review.googlesource.com/c/chromium/src/+/3174305
2021-10-05 15:30:31 -07:00