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

158 Коммитов

Автор SHA1 Сообщение Дата
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
Milan Burda 80577a4f08
refactor: use native WeakRef instead of v8util.weaklyTrackValue() (#31153) 2021-09-27 16:50:42 -04:00
Milan Burda 98ac0ca52a
fix: running tests with release build (#31092) 2021-09-27 16:58:03 +02:00
祈緒ちゃん - Kiochan ad98f4707f
chore: update links of documentation of chromes (#30959)
chrome now use developer.chrome.com/docs/extensions/* instead of developer.chrome.com/extensions/*
2021-09-17 10:53:28 +09:00
Samuel Attard 57d088517c
feat: add support for validating asar archives on macOS (#30667)
* feat: add support for validating asar archives on macOS

* chore: fix lint

* chore: update as per feedback

* feat: switch implementation to asar integrity hash checks

* feat: make ranged requests work with the asar file validator DataSourceFilter

* chore: fix lint

* chore: fix missing log include on non-darwin

* fix: do not pull block size out of missing optional

* fix: match ValidateOrDie symbol on non-darwin

* chore: fix up asar specs by repacking archives

* fix: maintain integrity chain, do not load file integrity if header integrity was not loaded

* debug test

* Update node-spec.ts

* fix: initialize header_validated_

* chore: update PR per feedback

* chore: update per feedback

* build: use final asar module

* Update fuses.json5
2021-09-09 14:49:01 -07:00
Jeremy Rose 55c57808fb
feat: serialize NativeImage over ipc (#30729) 2021-09-07 10:37:45 -07:00
George Xu bc508c6113
feat: add `electron.safeStorage` encryption API (#30020)
* feat: add SafeStorage api; first commit

* chore: rename files to fit semantically

* chore: add linkedBindings

* chore: fix function signatures

* chore: refactor eisCookieEncryptionEnabled() fuse

* chore: create test file

* chore: add tests and documentation

* chore: add copyright and lint

* chore: add additional tests

* chore: fix constructor

* chore: commit for pair programming

* wip: commit for keeley pairing

* chore: docs change and code cleanup

* chore: add linux import

* chore: add description to documentation

* chore: fixing tests

* chore: modify behaviour to not allow unencrypted strings as decyption input

* fix add patch for enabling default v11 encryption on Linux

* chore: remove file after each test

* chore: fix patch

* chore: remove chromium patch

* chore: add linux specific tests

* chore: fix path

* chore: add checker for linuux file deletion

* chore: add dcheck back

* chore: remove reference to headless mode

* chore: remove tests for linux

* chore: edit commit message

* chore: refactor safeStorage to not be a class

* chore: remove static variable from header

* chore:  spec file remove settimeout

Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
2021-08-05 15:12:54 -07:00
Milan Burda 6e43b0bcbf
refactor: only create webContents after 'will-attach-webview' (#30311) 2021-08-03 10:08:49 -07:00
Milan Burda c5ad7ed0cd
refactor: remove guestInstanceId from WebPreferences (#30280)
* refactor: remove guestInstanceId from WebPreferences

* refactor: remove WebViewManager::GetEmbedder
2021-07-28 15:32:53 -07:00
Milan Burda a545cd3790
fix: type internal APIs that can return null properly (#29852) 2021-07-27 14:48:12 +09:00
Jeremy Rose 612361c4da
chore: remove unused getWebPreferences method (#30160) 2021-07-19 09:29:23 -07:00
Milan Burda de6696ef1d
chore: remove unused and broken ipcRendererInternal.sendTo() (#29743) 2021-06-17 23:26:18 -05:00
Jeremy Rose ebf54d7cc0
refactor: use PathProvider for user-data-dir and others (#29649)
* refactor: use PathProvider for user-data-dir and others

* consolidate logic for DIR_RECENT and DIR_APP_LOGS into path provider

* fix bad include

* remove debugging code

* fix build on mac

* fix build on win

* create app logs dir on both mac and non-mac
2021-06-15 09:32:56 +09:00
Milan Burda 8d0ed05c99
refactor: replace a few usages of V8 hidden properties (#29400) 2021-06-03 14:59:56 +09:00
Shelley Vohr d6109b2eb4
chore: remove unused methods (#29438) 2021-06-02 16:27:45 +09:00
Shelley Vohr 3b75549511
fix: inspector context menu throwing an error (#29436) 2021-06-01 20:39:48 -07:00
Robo 77297f37a3
fix: adjust initial webContents focus calculation (#29204)
* fix: adjust initial webContents focus calculation

* fix: active window check on mac

* fix: about:blank focus behavior

* chore: add spec

Co-authored-by: Raymond Zhao <raymondzhao@microsoft.com>
2021-05-19 02:27:35 -07:00
Milan Burda c68c65f383
refactor: implement <webview> using contextBridge (#29037)
* refactor: implement <webview> using contextBridge

* chore: address PR feedback

* chore: address PR feedback

* fix: check for HTMLIFrameElement instance in attachGuest
2021-05-15 16:42:07 +09:00
Milan Burda cbba602eae
chore: cleanup dead <webview> related code (#29039) 2021-05-06 13:56:05 -07:00
Samuel Attard e5e8ab4eea
refactor: remove more dead code post render process reuse (#28983)
* Overrides for window.history.*
* Node environment cleanup / creation logic
* Options and switches that are now static values
2021-05-04 11:30:29 -07:00
Milan Burda a0589ca5d7
chore: remove unused element_instance_id_to_guest_map_ from WebViewManager (#28979) 2021-05-04 09:59:44 -04:00
Jeremy Rose dba4df9326
feat: add more info in setWindowOpenHandler details (#28518)
* fix: invoke the window open handler for _blank links

* feat: add disposition to setWindowOpenHandler details

* fix: pass postData to new-window event

* postData can be heterogeneous

* fix type of postBody

* fix type of UploadFile and UploadRawData to be discriminated unions

* exclude the empty string from additionalFeatures

* add a test

* add postBody and referrer to setWindowOpenHandler args

* appease typescript

* Update api-browser-window-spec.ts

* update snapshots
2021-04-13 15:35:27 -04:00
Samuel Attard 6df2680cb6
refactor: clean up webFrame implementation to use gin wrappers (#28497)
* refactor: clean up webFrame implementation to use gin wrappers

The previous implementation of webFrame in the renderer process leaked
sub-frame contexts and global objects across the context boundaries thus
making it possible for apps to either maliciously or accidentally
violate the contextIsolation boundary.

This re-implementation binds all methods in native code directly to
content::RenderFrame instances instead of relying on JS to provide a
"window" with every method request.  This is much more consistent with
the rest of the Electron codebase and is substantially safer.

* chore: un-re-order for ease of review

* chore: pass isolate around instead of ErrorThrower

* chore: fix rebase typo

* chore: remove unused variables
2021-04-12 16:35:18 -07:00
Milan Burda da8c35e3b2
chore: remove deprecated worldSafeExecuteJavaScript option (#28456) 2021-04-08 12:03:57 -04:00
Milan Burda 55c66e3e92
chore: add types for electron_renderer_web_frame binding (#28455)
* chore: add types for electron_renderer_web_frame binding

* chore: use keyof for getWebPreference type

Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-04-02 14:34:28 -07:00
Jeremy Rose d27ad0d182
fix: revert "refactor: mmap asar files (#24470)" (#28137)
This reverts commit 01a2e23194.
2021-03-15 11:42:54 -07:00
Cheng Zhao 5b710519cf
test: reliably wait for spellchecker to load (#28118) 2021-03-12 16:35:57 +09:00
Milan Burda 5b205731f6
chore: remove deprecated remote module (#25734)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-03-09 17:12:40 -08:00
Jeremy Rose 706d9ede9b
refactor: only allow internal messages from the main process (#27676) 2021-02-09 17:12:26 -08:00
Milan Burda 79b3393768
chore: remove bunch of usages of any (#27512) 2021-01-29 12:41:59 -08:00
Milan Burda 64b7be751a
fix: CSP with `unsafe-eval` detection with Trusted Types (#27446) 2021-01-25 10:31:25 +09:00
Milan Burda 70190ec2b1
chore: update to latest TypeScript, which has built-in WeakRef declarations (#27425) 2021-01-22 11:25:47 -08:00