Commit graph

3938 commits

Author SHA1 Message Date
trop[bot]
2d45b7df34
fix: context-menu event with BaseWindows (#44952)
fix: context-menu event with BaseWindows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-12-04 16:03:02 -08:00
trop[bot]
9a7848ced1
feat: Add shared dictionary management APIs (#44950)
* Add bare-bones GetSharedDictionaryUsageInfo

* Add GetSharedDictionaryInfo()

* Improve API, use isolation keys

* Add documentation

* Update docs/api/session.md



* Update shell/browser/api/electron_api_session.cc



* Add tests

* Implement feedback <3

* Improve tests

* chore: lint

* docs: add note about clearing cache in ses.clearData

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
2024-12-04 13:35:08 -08:00
trop[bot]
7f6594654c
docs: fix grammar in app.relaunch docs (#44942)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2024-12-03 10:12:47 -08:00
trop[bot]
f383391c0e
feat: WebFrameMain.collectJavaScriptCallStack() (#44938)
* feat: WebFrameMain.unresponsiveDocumentJSCallStack

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* Revert "feat: WebFrameMain.unresponsiveDocumentJSCallStack"

This reverts commit e0612bc1a00a5282cba5df97da3c9c90e96ef244.

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* feat: frame.collectJavaScriptCallStack()

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* feat: frame.collectJavaScriptCallStack()

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* Update web-frame-main.md

Co-authored-by: Sam Maddock <smaddock@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2024-12-03 09:55:52 -08:00
trop[bot]
d1eee44b19
docs: clarify what session.clearData() with data type 'cache' deletes (#44930)
* docs: clarify what session.clearData() with data type 'cache' deletes

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* docs: include `shadercache`, too

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2024-12-02 14:03:12 -05:00
trop[bot]
dc53f6e73b
docs: clarify session.clearData() can delete more types than listed (#44927)
docs: warn that session.clearData() might delete more than expected

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2024-12-02 13:51:00 -05:00
trop[bot]
d7284f0262
docs: specify default value for respondToAuthRequestsFromMainProcess (#44901)
docs: specify default value for respondToAuthRequestsFromMainProcess

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2024-12-01 07:13:39 -06:00
trop[bot]
3764c4d0b3
docs: Make ipcRenderer and ipcMain listener API docs consistent (#44711)
* docs: Make ipcRenderer and ipcMain listener API docs consistent

Co-authored-by: Will Anderson <will@itsananderson.com>

* test: add some unit tests for ipcRenderer/ipcMain listener behavior

Co-authored-by: Will Anderson <will@itsananderson.com>

* fix: Mark on/off methods as primary and addListener/removeListener as aliases

Co-authored-by: Will Anderson <will@itsananderson.com>

* fix: clear all listeners before running ipcMain removeAllListeners tests

Co-authored-by: Will Anderson <will@itsananderson.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Will Anderson <will@itsananderson.com>
2024-11-19 09:47:45 +01:00
trop[bot]
5fc13009cb
fix: utilityProcess pid should be undefined after exit (#44695)
fix: utilityProcess pid should be undefined after exit

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-11-18 14:44:14 +01:00
trop[bot]
2ee65f9c10
fix: revert required portal version for file chooser dialogs (#44681)
* feat: add support for configuring xdg portal version at runtime

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* doc: update command-line-switches.md

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* doc: update command-line-switches.md

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

Co-authored-by: Robo <hop2deep@gmail.com>

* doc: required portal version for defaultPath support

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

Co-authored-by: Robo <hop2deep@gmail.com>

* doc: update more occurrances

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* fix: remove warning from save dialogs

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* doc: update command-line-switches.md

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

Co-authored-by: Robo <hop2deep@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2024-11-15 11:30:06 -05:00
trop[bot]
66bf0732dc
chore: remove executable flag from docs/api/app.md file permissions (#44580)
chore: set docs/api/app.md file permissions to 644

md files should not be executable

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-11-05 12:12:40 -05:00
trop[bot]
5a09ca8d1e
docs: clarify that sessions use cache by default (#44576)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2024-11-05 10:39:58 -06:00
trop[bot]
ab619ff231
docs: capitalize POSIX and Windows correctly (#44559)
* docs: capitalize POSIX correctly

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* docs: capitalize Windows correctly

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-11-04 16:43:05 -05:00
trop[bot]
434363de26
docs: fix apostrophe typo "Electrons" -> "Electron's" (#44537)
s/Electrons/Electron's/

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-11-03 09:33:10 -06:00
trop[bot]
5498eaa29d
docs: add custom titlebar example (#44506)
* docs: add custom titlebar example

* docs: add links and other small edits

* docs: add panel window docs

* docs: remove panel example

* docs: specify expected emphasis style

* docs: responding to feedback

* docs: fix section names in links

* docs: rework baseWindow note

* docs: making window customization its own section

* responding to feedback

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Anny Yang <anny@electronjs.org>
2024-11-01 12:47:51 -05:00
trop[bot]
5d5c18b7a6
fix: update shell.openExternal to correctly focus on external window (#44469)
* Revert "docs: fix `win.getContentView(`) return type (#44464)"

This reverts commit b11c6cf9bf.

* fix: Use openURL:configuration:completionHandler instead of openUrl

Co-authored-by: alice <alice@makenotion.com>

* test: add a test

Co-authored-by: alice <alice@makenotion.com>

* fix: add dispatch_async to replace GetUIThreadTaskRunner

Co-authored-by: alice <alice@makenotion.com>

* refactor: remove unused import

Co-authored-by: alice <alice@makenotion.com>

* fix: update to use BindPostTaskToCurrentDefault

Co-authored-by: alice <alice@makenotion.com>

* test: add regression test for window focus

Co-authored-by: alice <alice@makenotion.com>

* refactor: update to explicit task runner

Co-authored-by: alice <alice@makenotion.com>

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: alice <alice@makenotion.com>
2024-10-31 12:05:44 +01:00
trop[bot]
13dacf6a32
docs: fix win.setContentView() arg type (#44481)
fix: setContentView type

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-10-30 16:26:12 -04:00
trop[bot]
b11c6cf9bf
docs: fix win.getContentView() return type (#44464)
docs: fix win.getContentView() return type

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-10-29 17:00:13 -04:00
trop[bot]
b9b982cd7d
docs: clarify utilityProcess child.pid value (#44363)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-10-22 19:22:02 +02:00
Niklas Wenzel
72802c374b
docs: add section on resource management to base-window.md (#43610) 2024-10-15 11:49:54 -04:00
Sam Maddock
8b3d70a2a3
feat: add WebFrameMain detached property (#43473)
* feat: add WebFrameMain detached property

fix: throw instead of returning null senderFrame

test: detached frames

fix: ensure IPCs of pending deletion RFHs are dispatched

fix: lookup WFM by FTN ID to dispatch IPCs

feat: add frame.isDestroyed()

return null

fix: return undefined

docs: add null to all frame properties

refactor: option c, return null and emit warning

refactor: add routingId & processId to navigation events

test: null frame property

docs: clarify warning message

better wording

clarify null frame

fix: browserwindow spec

* maybe fix 🤷

* fix: use updated util #43722

* docs: add notice for frame change of behavior

* docs: clarify why frame properties may be null

* lint

* wip

* fix: content::FrameTreeNodeId lookup and converter

* refactor: avoid holey array deoptimization

---------

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-10-11 18:33:53 -04:00
Niklas Wenzel
5400c04e43
docs: clarify interplay between utility process events (#44015) 2024-10-11 10:25:25 -04:00
Keeley Hammond
08d315da14
refactor: revert url::DomainIs() for cookie domains (#44153)
build: revert DomainIs refactor
2024-10-08 18:39:37 -07:00
Robo
f68184a9f9
feat: add error event for utility process (#43774)
* feat: add error event for utility process

* chore: use public report api

* chore: fix lint

* doc: mark error event as experimental

---------

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-09-27 10:17:06 +09:00
Samuel Attard
74af96da16
build: update some build dependencies (#43882)
* build: update some build dependencies

* build: fix eslint issues after updating

* build: disable ts check on busted js example

* build: update internal types for stricter event handling

* restore url.parse behavior

* fix typing issues

* sigh

* build: update easy deps

* build: skip woa engines check
2024-09-26 00:12:11 -07:00
Erick Zhao
fb5baec6d5
docs: add advanced specification for Squirrel updater (#43234)
* docs: add advanced specification for Squirrel updater

* address feedback
2024-09-23 10:20:43 -07:00
Niklas Wenzel
8f0dffea9e
docs: document View.removeChildView edge case (#43673) 2024-09-16 11:32:03 +02:00
Keeley Hammond
309d5dade3
feat: add support for system picker in setDisplayMediaRequestHandler (#43581)
* tmp

* feat: add support for system picker in setDisplayMediaRequestHandler

* oops

* Apply suggestions from code review

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

* stuff

* well...

* seems legit

* chore: update patch to handle screenCapturer

* feat: modify API to use useSystemPicker

* fix: gate ScreenCaptureKitPicker to macos 15 or higher

* fix: don't use native picker with legacy media selection

* chore: code review, boolean set & docs update

* fix: add cancelCallback

* docs: clarify session & desktopCapturer docs

---------

Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
Co-authored-by: Samuel Attard <sam@electronjs.org>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-09-10 16:05:57 -07:00
Kilian Valkhof
32d5f9e3ef
docs: explain ipcRenderer behavior in context-bridge.md (#43455)
* docs: explain ipcRenderer behavior in context-bridge.md

* Update context-bridge.md

* Update context-bridge.md

* Update docs/api/context-bridge.md

Co-authored-by: Erik Moura <erikian@erikian.dev>

* Update context-bridge.md

* Update context-bridge.md

* Update context-bridge.md

* Update docs/api/context-bridge.md

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

* Update docs/api/context-bridge.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: Erik Moura <erikian@erikian.dev>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2024-09-05 16:48:22 -04:00
Shelley Vohr
3a5a1ea7bd
docs: titleBarOverlay is defined as a BaseWindow ctor option (#43430)
docs: titleBarOverlay is defined as a BaseWindow ctor option
2024-08-23 11:02:43 -04:00
reito
1aeca6fd0e
feat: GPU shared texture offscreen rendering (#42953)
* feat: GPU shared texture offscreen rendering

* docs: clarify texture infos that passed by the paint event.

* feat: make gpu osr spec test optional

* fix: osr image compare

* fix: remove duplicate test

* fix: update patch file

* fix: code review

* feat: expose more metadata

* feat: use better switch design

* feat: add warning when user forget to release the texture.

* fix: typo

* chore: update patch

* fix: update patch

* fix: update patch description

* fix: update docs

* fix: apply suggestions from code review

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* fix: apply suggested fixes

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-08-22 19:23:13 -05:00
Shelley Vohr
50ce448556
fix: menu should allow focused BaseWindow where possible (#43404)
fix: menu should allow focused BaseWindow
2024-08-22 14:13:30 -04:00
Alexander Cyon
b27dc7514e
fix: documentation spelling errors (#43366)
chore: fix typos in 'docs/' folder.
2024-08-22 15:44:55 +02:00
Shelley Vohr
755c6640fd
docs: clarify icon value in Notification (#43377)
* docs: clarify icon value in Notification

* Update docs/api/notification.md

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

---------

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-08-21 19:38:06 -05:00
Vít Černý
189675575c
feat: extend navigationHistory API (#42014)
* feat: extend navigationHistory API

* refactor: simplify index checking

* refactor: rename 'getHistory' and 'replaceHistory' methods of navigationHistory

* refactor: rename delete*() methods to remove*()

* feat: remove navigationHistory.replaceHistory()

* tests: add tests for removeEntryAtIndex and getAllEntries
2024-08-19 15:46:04 -04:00
Piotr Płaczek
4d51edc504
docs: api history (#42982)
* feat(api-history): api history schema

Reference: f36e0a8483/text/0004-api-history-schema.md

* feat(api-history): add `lint:api-history` to `package.json`

* docs(api-history): add api history to `styleguide.md`

* docs(api-history): `win.flashFrame(flag)`

* docs(api-history): `new WebContentsView([options])`

* docs(api-history): non-navigation APIs on `WebContents`

* docs(api-history): `nativeImage.toDataURL`

* docs(api-history): `window.flashFrame(bool)`

* docs(api-history): `browser-view.md`

* docs(api-history): `ipcRenderer`

* docs(api-history): `protocol.*Protocol`

* revert: `new WebContentsView([options])`

This reverts commit 0a11efcf57cdf1f061ed4a3272e87f06d2fc7cb0.

* Apply suggestions from code review

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* fix(api-history): remove incorrect `pr-url`

Reference: https://github.com/electron/electron/pull/42982/files#r1692532877

* docs(api-history): schema word choice

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

Reference: 0b1b6a7cc0

* docs(api-history): nicer format example in `styleguide.md`

Reference: https://github.com/electron/electron/pull/42982#discussion_r1692539906

* docs(api-history): Always use double quotes for descriptions

* docs(api-history): `styleguide.md` improvements

* docs(api-history): copy `ipc-renderer.md` change to `context-bridge.md`

* docs(api-history): `styleguide.md` placement

* docs(api-history): add migration guide

* docs(api-history): remove confusing `breaking-changes-header` in `browser-view.md`

Reference: 7b03c0703d (r1703444772)

* docs(api-history): move migration guide

Reference: https://github.com/electron/electron/pull/42982#discussion_r1703441001

* docs(api-history): update `breaking-changer-header`

Reference: https://github.com/electron/electron/pull/43217

* docs(api-history): deprecate `browser-view.md`

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2024-08-19 11:17:10 -07:00
Shelley Vohr
d7689bb9b5
docs: expand dialog window to BaseWindow (#43334)
docs: expand dialog window to BaseWindow
2024-08-16 10:49:10 -04:00
Robo
9b166b3ed4
feat: support app#login event for utility process net requests (#42631)
* feat: support app#login event for utility process net requests

* chore: address review feedback

* GlobalRequestID: Avoid unwanted inlining and narrowing int conversions

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5702737
2024-08-14 11:36:47 +09:00
Shelley Vohr
d294871980
chore: deprecate textured BrowserWindow type option on macOS (#43133) 2024-08-12 10:32:35 +02:00
Charles Kerr
c35739d60d
refactor: use url::DomainIs() to check cookie domains (#43262)
* test: add tests to exercise pre-exsiting cookie domain matching behavior

* refactor: use url::DomainIs() to match cookie domains

* docs: fix typo
2024-08-09 18:35:18 -05:00
Felix Rieseberg
3fabf7837e
docs: Document ideal iconPath size (#43149) 2024-08-07 11:43:05 +02:00
Shelley Vohr
5669a40d5c
feat: add transparency checking to nativeTheme (#42862)
* feat: add transparency checking to nativeTheme

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

* chore: deprecate previous function

* chore: fix lint
2024-07-24 14:38:22 +02:00
Shelley Vohr
9fc760bc4c
docs: note macOS fullscreen events in fullscreen query (#42997)
docs: note macOS fullscreen events in fs query
2024-07-23 16:40:59 -04:00
Shelley Vohr
3c9d4452c6
docs: improve desktop capture example (#42957) 2024-07-23 11:55:23 +02:00
Shelley Vohr
8454f4e49f
feat: emit an event when accessing restricted path in File System Access API (#42561)
* fix: show a dialog when accessing restricted path in File System Access API

* fix: allow overriding initial blocked paths

* docs: fix doc

* Update docs/api/session.md

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

* fix: change block to deny for consistency

---------

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-07-22 12:18:15 +02:00
arno renevier
81bdba67ec
feat: Implement password delegate for NSS (#41205)
* feat: Implement password delegate for NSS (#41188)

Introduce an app event client-certificate-request-password. It allows
the user to display a UI to prompt for the password.

An alternative would have been to implement a class similar to
CryptoModulePasswordDialogView, to provide the UI. This might have been
simpler for the user, comparing to letting them implement the UI. But it
seems like electron does not have an i18n framework, so it's not
possible to provide a locale aware UI.

* fix lint:markdown error

* address review comments

* use a trampoline handler in JS. The api exposed is now app.setClientCertRequestPasswordHandler
* use properties on the Event object instead of positional parameters
* remove ChromeNSSCryptoModuleDelegate::OnPassword in favor of args->GetNext(&password_)

* address review comments second round

- backslash escape parametrized TypeScript
- rename hostName param to hostname
- use base::ScopedAllowBaseSyncPrimitivesForTesting
- and then, rename ChromeNSSCryptoModuleDelegate to ElectronNSSCryptoModuleDelegate

* Update docs/api/app.md

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

* Update docs/api/app.md

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

---------

Co-authored-by: Arno Renevier <arnaud@switchboard.app>
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-07-17 09:48:03 -04:00
Sam Maddock
778d3098a0
feat: customize border radius of Views (#42320)
* feat: add View#setBorderRadius

test: initial setBorderRadius tests

fix: robustly set border radius

chore: add PAUSE_CAPTURE_TESTS for easier screencap dev

feat: add view border radius support

test: view border radius

refactor: cleanup view code

* maybe delay capture to fix tests?

* refactor: retry screen captures in an attempt to fix flakiness

* refactor: ScreenCapture constructor no longer async

* increase screen capture timeout, feels a little short

* refactor: move rounded rect util into chromium_src

* skip some capture tests on mas
2024-07-16 20:16:25 -04:00
Theo Gravity
bab3fcc9ab
feat: add getPercentComplete / getCurrentBytesPerSecond / getEndTime to DownloadItem (#42805)
feat: getCurrentSpeed / getPercentComplete / getEndTime on DownloadItem
2024-07-15 19:32:44 -04:00
Anny Yang
14303a0a71
docs: grammar fix in isBeingCaptured docs (#42692) 2024-07-01 15:01:27 -04:00
Chris Stringer
2b5342cb49
docs - Update net.md (#42691)
Update net.md

Changes heading level for net.resolveHost() entry to H3
2024-07-01 14:45:49 -04:00