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

3912 Коммитов

Автор SHA1 Сообщение Дата
Milan Burda fdab0799fe
docs: only macOS 10.13+ is supported now (#37286)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-02-15 16:29:02 -08:00
Shelley Vohr 889859df5b
feat: include all standard paper sizes for webContents.print() (#37159) 2023-02-14 11:44:34 +01:00
Andrew Ferreira cb03c6516b
docs: add `win.isFocusable()` return type (#37245)
docs: fix `win.isFocusable()` return type
2023-02-14 10:01:22 +01:00
Milan Burda a38b711fb1
feat: add logUsage to shell.openExternal() options (#37139)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-02-14 17:53:18 +09:00
Jeremy Rose 71944f2c3b
refactor: simplify events (#37099) 2023-02-13 13:39:18 -08:00
Milan Burda 3180312595
chore: update https://cs.chromium.org/ links to https://source.chromium.org/ (#37190)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-02-11 18:52:32 -08:00
Milan Burda e5e9186d61
docs: add missing clipboard-sanitized-write permission value to setPermissionRequestHandler() (#37173)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-02-09 11:38:39 +01:00
Jeremy Rose 9a0a0a7a46
fix: type for received-apns-notification event (#37177) 2023-02-07 22:43:29 -08:00
Milan Burda 8d382b9c60
chore: remove deprecated capturer count APIs (#37075)
chore: remove deprecated incrementCapturerCount() / decrementCapturerCount()

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-02-06 07:54:47 -08:00
David Sanders 9ec13afeaf
docs: add missing ipcRenderer require to example code (#37134) 2023-02-06 14:40:16 +09:00
Samuel Attard 1a6085e20e
docs: improve globalShortcut and hookWindowMessage types (#37115) 2023-02-02 12:31:28 -08:00
Milan Burda ac266e2187
docs: remove invalid appcache value from storages in clearStorageData() (#37095) 2023-02-01 17:35:21 -08:00
Shelley Vohr 730a07ad62
docs: note how to clear an aspect ratio (#37074) 2023-01-31 12:36:09 -08:00
Cheng Zhao c303135b02
fix: fallback to GtkStatusIcon when app indicator is not supported (#36815)
* chore: get ready for multi backend tray

* fix: fallback to GtkStatusIcon when app indicator is not supported

* chore: use smart pointers
2023-01-26 19:15:55 +09:00
Shelley Vohr 7d46d3ec9d
feat: emit `devtools-open-url` event for DevTools link selection (#36774)
* feat: emit event for DevTools link selection

* chore: devtools-open-in-new-tab -> devtools-open-url
2023-01-26 09:54:26 +01:00
David Sanders ca3145a547
chore: use vscode-markdown-languageservice for link linting (#36901)
* chore: use vscode-markdown-languageservice for docs link linting

* docs: make links relative
2023-01-24 09:00:25 +01:00
GGIEnrike 5ce8dfdcb5
docs: Change factuality and word choice in app.runningUnderARM64Translation (#36947)
Change factuality and word choice.

Added "or WOW" to the phrase, "when they are running the x64 version under Rosetta", to reflect the use of a supported platform, Windows, as a possible scenario.
Changed the wording of that same sentence to make it appear clearer. "incorrectly" to "mistakenly" and moved this word to before the verb instead of the end of the sentence.
2023-01-19 15:00:06 -05:00
David Sanders 4e4ae9ff53
docs: update clipboard fiddles (#36946) 2023-01-19 14:59:35 -05:00
Milan Burda 2c56a06ad3
feat: add label property to Display objects (#36855) 2023-01-18 15:44:40 +09:00
David Sanders d94f35a8f6
chore: disallow shortcut reference links in docs Markdown (#36860)
* chore: disallow shortcut reference links in docs Markdown

* docs: clean up shortcut-style links
2023-01-16 10:22:49 +01:00
David Sanders a9c03950c0
docs: cleanup reference links (#36659) 2023-01-11 22:16:34 -08:00
Milan Burda 1c9e7687f9
docs: add missing window-management permission value to setPermissionRequestHandler() (#36776)
Co-authored-by: Milan Burda <miburda@microsoft.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2023-01-10 09:49:04 +01:00
Mikael Finstad ba962c94cc
docs: Add note about argv getting modified (#36735)
Add note about argv getting modified

See https://github.com/electron/electron/issues/20322
2023-01-05 11:39:45 +01:00
David Sanders 700f43c90c
docs: cleanup some rogue backticks (#36778) 2023-01-04 14:52:46 +01:00
David Sanders 20cff64282
docs: update links (#36657) 2023-01-02 11:52:18 +01:00
Michał Zarach 6a798b1c58
feat: added username to IAP purchaseProduct method (#35902) 2022-12-12 10:11:48 -08:00
Hugh Davey 4e66184287
docs: add mdn link to web-request-filter.md (#36603)
* Add MDN link to web-request-filter.md

When I was using the Electron docs I wanted to know how to use [webRequest.onBeforeSendHeaders](https://www.electronjs.org/docs/latest/api/web-request#webrequestonbeforesendheadersfilter-listener) but I was unable to correctly guess the correct format for the `WebRequestFilter` URL strings, and there was no explanation in the Electron docs. Eventually I googled it and found the MDN article which helped me.

* Update docs/api/structures/web-request-filter.md

Co-authored-by: Black-Hole <158blackhole@gmail.com>

* Update docs/api/structures/web-request-filter.md

Co-authored-by: Black-Hole <158blackhole@gmail.com>

Co-authored-by: Black-Hole <158blackhole@gmail.com>
2022-12-08 17:11:42 -05:00
Samuel Attard e1e66fc8ac
docs: link net.request options to ClientRequestConstructorOptions (#36556) 2022-12-05 15:17:37 -08:00
David Sanders 993d0337a7
docs: fix broken links (#36519)
* docs: fix broken links

* docs: change link to navigator.getUserMedia

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

* docs: fix link in examples.md

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2022-12-05 13:18:57 -05:00
Shelley Vohr d092e6bda4
feat: expose window.invalidateShadow() (#32452)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: Darshan Sen <raisinten@gmail.com>
2022-12-01 10:24:44 -08:00
Jeremy Rose 835e248dff
docs: document outlivesOpener option in window open handler (#36486) 2022-11-30 15:20:19 -08:00
Jeremy Rose e3b7c3024f
docs: fix loadExtension example (#36489) 2022-11-30 11:29:02 -08:00
Cheng Zhao 16a7bd7102
fix: reimplement Tray with StatusIconLinuxDbus on Linux (#36333) 2022-11-28 11:36:25 -08:00
Jeremy Rose 32583ac756
docs: add missing event-emitter link to utility-process docs (#36428)
add missing event-emitter link
2022-11-23 17:52:36 +09:00
John Kleinschmidt 629c54ba36
feat: add support for WebUSB (#36289)
* feat: add support for WebUSB

* fixup for gn check

* fixup gn check on Windows

* Apply review feedback

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

* chore: address review feedback

* chore: removed unneeded code

* Migrate non-default ScopedObservation<> instantiations to ScopedObservationTraits<> in chrome/browser/

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

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-11-22 16:50:32 -05:00
Raymond Zhao 5fc3ed936e
feat: add app.getPreferredSystemLanguages() API (#36035)
* feat: add app.getSystemLanguage() API

* Change the API to getPreferredSystemLanguages

* Fix test

* Clarify docs and add Linux impl

* Remove USE_GLIB

* Don't add C to list

* Remove examples since there's a lot of edge cases

* Fix lint

* Add examples

* Fix compile error

* Apply PR feedback

* Update the example
2022-11-09 10:50:43 -05:00
David Sanders 0ba0df4523
docs: fix driverId -> deviceId typo (#36246) 2022-11-07 09:37:51 -05:00
Brad Carter 15540975ff
feat: Add BrowserWindow option to hide window in Mission Control (macOS) (#36092)
* feat: Add BrowserWindow option to ignore Mission Control (macOS)
* There are many circumstances when app developers may want to hide their
windows from mission control. E.g., full screen overlays, small helper
windows, dialogs, etc.
* This PR adds the functionality, docs, and tests.

* chore:Rename variables

* Update shell/browser/native_window_mac.h

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

Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-11-01 16:43:42 -04:00
electron-roller[bot] ea6f873f97
chore: bump chromium to 109.0.5382.0 (main) (#36057)
* chore: bump chromium in DEPS to 109.0.5364.0

* chore: update patches

* chore: bump chromium in DEPS to 109.0.5366.0

* chore: update patches

* i3940364: Change PermissionType::WINDOW_PLACEMENT to WINDOW_MANAGEMENT

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

* 3866812: Change content::PluginList to only run on the UI thread.

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

* chore: bump chromium in DEPS to 109.0.5368.0

* [cleanup] Replace enable_basic_printing with enable_printing

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

* chore: update patches

* 3956318: Desktop PWAs: Retire kWebAppWindowControlsOverlay flag

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

* fixup! Change content::PluginList to only run on the UI thread.

(cherry picked from commit 7b5ec87d4f)
Co-Authored-By: Robo <hop2deep@gmail.com>

* chore: bump chromium in DEPS to 109.0.5370.0

* 3956299: Quota: Cleanup QuotaPermissionContext

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

* chore: update patches

* 3803867: Add Mojo interface to parse XML for OOP printer capabilities

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

* fixup: Add Mojo interface to parse XML for OOP printer capabilities

* chore: bump chromium in DEPS to 109.0.5372.0

* chore: update patches

* chore: bump chromium in DEPS to 109.0.5374.0

* chore: bump chromium in DEPS to 109.0.5376.0

* chore: bump chromium in DEPS to 109.0.5378.0

* chore: update patches

* Quota: Cleanup kPersistent in BrowsingDataRemover

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

* 3955976: serial: Create DOMException with V8ThrowDOMException

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

* 3758405: Append trailer data to serialized messages.

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

* chore: revert clang roll

This patch reverts https://chromium-review.googlesource.com/c/chromium/src/+/3967491
because that roll breaks the WOA build: https://crbug.com/1377819

* chore: update patches

* chore: bump chromium in DEPS to 109.0.5380.0

* chore: update patches

* 3859750: [linux/wayland] Added plumbing for the state of tiled edges.

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

Also 3970920: [linux/wayland] Fixed the tiled edges for the GTK frame.

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

* chore: bump chromium in DEPS to 109.0.5382.0

* chore: update patches

* chore: revert Use accessibility.pkey when setting page access.

https://chromium-review.googlesource.com/c/chromium/src/+/3949281
breaks our Linux builds run under Docker.

This patch should be removed once
https://chromium-review.googlesource.com/c/chromium/src/+/3949284
is merged.

* 3976312: Roll clang llvmorg-16-init-8189-g97196a2d-2 : llvmorg-16-init-8697-g60809cd2-1

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

* 3967841: [heap] Remove AllocationSpace::MAP_SPACE enum constant

https://chromium-review.googlesource.com/c/v8/v8/+/3967841

* 3956131: [cleanup] Remove flag for Wasm threads & atomics

https://chromium-review.googlesource.com/c/v8/v8/+/3956131

* chore: update docs for Quota: Cleanup kPersistent in BrowsingDataRemover

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

* test: fixup HID test for ARM CI

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
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>
2022-10-27 12:37:04 -04:00
Shane Gannon 02ad8fcd5f
docs: correcting main example in WebRequest documentation (#36113)
Correcting main example

The entry `*://electron.github.io` is invalid and produces an exception. i.e.

> UnhandledPromiseRejectionWarning: TypeError: Invalid url pattern *://electron.github.io: Empty path.

Setting a valid path to resolve this issue
2022-10-27 16:18:07 +09:00
Jeremy Rose a75e8e051e
docs: document that when `invoke` rejects, it gives a different Error (#36127) 2022-10-26 13:56:41 -07:00
flynow10 ad289d120f
docs: fixed MenuItem documentation to use the same formatting for all role options (#36112)
Fixed MenuItem documentation

Some of the items in the list of possible roles were formatted differently, which made it harder to read.
Sorry if this was intended, but I found it easier to read with them all formatted the same.
2022-10-24 14:51:50 -04: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
Shelley Vohr 4310468513
feat: support `serialPort.forget()` (#35310)
feat: enable serialPort.revoke()
2022-10-18 11:22:32 +02:00
Shelley Vohr faafcc7f87
refactor: eliminate `DecrementCapturerCount` patch (#35710) 2022-10-05 19:51:33 +02:00
Jeremy Rose f82a863f65
feat: replace scroll-touch* with generic input-event (#35531) 2022-09-27 12:47:46 -07:00
Samuel Maddock c09c94fc98
feat: add WebContents.opener and webContents.fromFrame() (#35140)
* feat: add WebContents.opener

* feat: add webContents.fromFrame(frame)

* fix: unknown type name

* test: fix and add more fromFrame cases

* docs: clarified terminology
2022-09-26 12:37:08 -04:00
John Kleinschmidt 697a219bcb
feat: add support for Web Bluetooth pin pairing (#35416)
* feat: add bluetooth pairing handler

* Update docs/api/session.md

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

* Update docs/api/session.md

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

* docs: update based on review

* Apply suggestions from code review

Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: update docs per review

* chore: cleanup callback per review

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2022-09-26 10:19:58 -04:00
Raymond Zhao 8a0b4fa338
feat: add app.getSystemLocale() method (#35697)
* feat: add app.getSystemLocale() method

* Update shell/browser/electron_browser_main_parts.cc

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

* Change methods to be const

* Apply PR feedback

* Fix mac compile

* Add missing scope

* Apply style changes

* Change note

* Add braces to get the comment indentation right

* Change to static

* Apply PR feedback

* Fix the documentation

* Remove extraneous file

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-09-23 11:50:46 -07:00
Akshay Deo dfc134de42
feat: add exposeInIsolatedWorld(worldId, key, api) to contextBridge (#34974)
* feat: add exposeInIsolatedWorld(worldId, key, api) to contextBridge

* Updates exposeInIslatedWorld worldId documentation
2022-09-21 13:17:10 -05:00
Jeremy Rose eebf34cc6c
feat: add webContents.close() (#35509)
* feat: add webContents.close()

* update docs, add test for beforeunload override

* Update web-contents.md
2022-09-16 16:22:59 -07:00
Shelley Vohr 38a7da692a
chore: make macOS spellchecker fns formal no-ops (#35514)
* chore: make macOS spellchecker fns formal no-ops

* docs: correct no-op note

* test: add no-op specs
2022-09-14 15:10:16 -07:00
Jeremy Rose 9f97c3e50a
feat: expose content-bounds-updated event (#35533) 2022-09-13 10:49:34 -07:00
Kishan Bagaria 3a6d6ff008
docs: improve registerFileProtocol example (#35580)
* improve registerFileProtocol example

* link ProtocolResponse

* kick lint
2022-09-07 14:45:09 -04:00
Jeremy Rose 6ad679f540
feat: webFrameMain.origin (#35438) 2022-08-31 17:40:57 -07:00
Samuel Attard f65b05b8cc
fix: pass rfh instances through to the permission helper (#35419)
* fix: pass rfh instances through to the permission helper

* refactor: use WeakDocumentPtr instead of frame node id

* fix: handle missing initiator document

* fix: dispatch openExternal event for top level webview navs still
2022-08-26 12:31:33 +02:00
Shelley Vohr a3a9463024
fix: fullscreen crashing with `roundedCorners: false` (#35421) 2022-08-25 13:39:01 +02:00
Jeremy Rose 221bb51326
feat: session.setDisplayMediaRequestHandler (#30702) 2022-08-22 14:15:32 -07:00
Shelley Vohr 4d54cadb28
fix: WCO occlusion of DevTools (#35209) 2022-08-11 15:16:12 +02:00
Samuel Attard 1d95b98cc8
docs: fix getStoragePath return type (#35288)
Fixes #35255
2022-08-09 22:39:36 -07:00
Milan Burda 8646bf8d30
chore: remove deprecated 'new-window' event (#34526) 2022-08-09 17:57:05 -04:00
Brad Carter 21117ea5b2
docs: update tray docs with info for mac menubar icons (#35136) 2022-08-04 11:24:32 +02:00
Jeremy Rose 6d859dcd7f
feat: add WebContents.ipc (#34959) 2022-08-03 16:55:12 -07:00
Charles Kerr b67c69d741
fix: remove skip-taskbar feature on Linux. (#35123) 2022-08-01 12:42:02 +02:00
Stuart Schechter 63593ffb22
docs: don't wait for ready event to register open-url listener (#35019)
* Update app.md

Add warning about late registration of the open-url event.

* Update app.md
2022-07-27 14:00:35 +02:00
Jeremy Rose dd68fae081
test: migrate nativeImage specs to main (#35062)
* test: move nativeImage specs to main

* simplify test
2022-07-26 09:57:01 +02:00
Joan Xie afd08c9450
feat: Enable APNS registration + notification delivery in macOS apps (#33574) 2022-07-12 08:38:49 -07:00
David Sanders 98cd16d336
chore: fix typos (#34731) 2022-07-05 11:49:56 -04:00
electron-roller[bot] e86d1cba75
chore: bump chromium to 105.0.5129.0 (main) (#34403)
* chore: bump chromium in DEPS to 104.0.5096.0

* 3651284: Use the entry settings object for window.open navigation

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

* 3644598: Make RenderFrameHost used for notification permission decision

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

* 3642842: Window Placement: Prototype Fullscreen Capability Delegation - Part 2

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

* 3652785: [sandbox] Enable sandboxed pointers on sanitizer builds

https://chromium-review.googlesource.com/c/v8/v8/+/3652785

* 3611967: webhid: Migrate HidDelegate to use BrowserContext and Origin

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

* 3665762: Remove RenderFrameHost::IsRenderFrameCreated from //content/.

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

* 3659375: Fold x509_util_ios and most of x509_util_mac into x509_util_apple

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

* 3656234: [CodeHealth] Remove uses of base::ListValue::Append() (Final, take 2)

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

* chore: update patch indices

* chore: fix lint

* 3644598: Make RenderFrameHost used for notification permission decision

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

* webhid: Migrate HidDelegate to use BrowserContext and Origin

This is a temporary fix for  https://chromium-review.googlesource.com/c/chromium/src/+/3611967 to get the build compiling, but we need to either patch around  https://chromium-review.googlesource.com/c/chromium/src/+/3611967 or move our device permissioning to BrowserContext

* chore: fix lint

* build: run electron/script/gen-libc++-filenames.js

fixes gn check

* chore: bump chromium in DEPS to 104.0.5098.0

* chore: disable flaking tests

* 3682394: Change pipes surrounding code references in comments to backticks

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

* 3652749: Delete GLRenderer and related classes

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

* chore: fixup patch indices

* 3671199: Remove ContentMainDelegate::PostFieldTrialInitialization

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

* 3607963: hid: Do not exclude HID device with no collections

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

* refactor: use ElectronBrowserContext instead of WebContents to persist devices

due to changes like https://chromium-review.googlesource.com/c/chromium/src/+/3611967,
we can no longer use WebContents to store device permissions so this commit
moves device permission storage to live in memory in ElectronBrowserContext
instead.

* 3557253: Deprecate some signature checks

https://chromium-review.googlesource.com/c/v8/v8/+/3557253

* chore: bump chromium in DEPS to 104.0.5100.0

* 3680781: Add policy for Renderer App Container.

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

* chore: update patch indices

* 3675465: Update NetLog network service API to use mojom::DictionaryValue.

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

* chore: bump chromium in DEPS to 104.0.5102.0

* chore: update patches

* chore: bump chromium in DEPS to 104.0.5103.0

* chore: update patches

* chore: bump chromium in DEPS to 104.0.5104.0

* chore: update patches

* fix: add patch for DCHECK in fullscreen test

* build: fix nan build

* build: make the nan spec runner work on macOS

* chore: bump chromium in DEPS to 104.0.5106.0

* chore: update patches

* chore: bump chromium in DEPS to 104.0.5108.0

* chore: update patches

* chore: bump chromium in DEPS to 104.0.5110.0

* chore: update patches

* chore: bump chromium in DEPS to 104.0.5112.0

* chore: bump chromium in DEPS to 105.0.5113.0

* chore: bump chromium in DEPS to 105.0.5115.0

* chore: bump chromium in DEPS to 105.0.5117.0

* chore: update patches

* chore: update libcpp patch

* 3693745: Delete base::LowerCaseEqualsASCII()

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

* 3669226: Remove printing PostTask usage of IO thread

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

* 3687395: Remove DictionaryValue::HasKey().

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

* 3691014: Prevent unsafe narrowing: ui/accessibility, part 2

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

* 3560567: [MSC] Porting GenerateStreams clients to handle stream vectors.

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

* 3684873: [Bluetooth][Win/Linux] Add bluetooth pair confirmation prompt

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

* chore: bump chromium in DEPS to 105.0.5119.0

* chore: missing includes in desktop_notification_controller

* chore: update patches

* 3685951: Reland "Make sure screen object is created once in tests."

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

* fixup: Reland "Make sure screen object is created once in tests."

* 3646014: [API] Deprecate LegacyOOMErrorCallback

Ref: https://chromium-review.googlesource.com/c/v8/v8/+/3646014

* chore: bump chromium in DEPS to 105.0.5121.0

* chore: update patches

* 3699085: [cleanup] update PrintBackend::EnumeratePrinters to use reference

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

* chore: bump chromium in DEPS to 105.0.5123.0

* chore: update patches

* chore: bump chromium in DEPS to 105.0.5125.0

* chore: update patches

* 3630082: [sandbox] Also enable the sandbox outside of Chromium builds

Ref: https://chromium-review.googlesource.com/c/v8/v8/+/3630082

* chore: bump chromium in DEPS to 105.0.5127.0

* chore: update patches

* chore: bump chromium in DEPS to 105.0.5129.0

* chore: update patches

* 3703741: Remove WebContents::GetMainFrame.

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

* chore: update patches

* fixup! 3703741: Remove WebContents::GetMainFrame.

* fix lint

* more lint

* chore: document breaking change

* 3687671: [v8] Freeze flags after initialization

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

* fixup! 3560567: [MSC] Porting GenerateStreams clients to handle stream vectors.

* use the v8 allocator for node serdes

* chore: update patches

* remove faulty non-v8-sandbox-compatible code

* make NodeArrayBufferAllocator use the v8 allocator under the hood

* fixup! 3560567: [MSC] Porting GenerateStreams clients to handle stream vectors.

* fix build on windows

* 3691954: [Reland][Extensions Bindings] Validate arguments sent to API events

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

* chore: remove deprecated AccessorSignatures

https://github.com/nodejs/nan/pull/941

* Update patches/chromium/notification_provenance.patch

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

* remove chore_expose_v8_initialization_isolate_callbacks.patch

* add link to nodejs/nan#941

* 52026: Do not allow md4 or md5 based signatures in X.509 certificates.

https://boringssl-review.googlesource.com/c/boringssl/+/52026

* chore: update patches

* disable nan buffer-test

* disable sandboxed pointers for now

* force sandboxed pointers off

* improve node allocation patch

* restore accidentally dropped node crypto test patch

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@salesforce.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: Jeremy Rose <japthorp@slack-corp.com>
2022-06-27 15:50:08 -05:00
Josh Soref ea4278754c
chore: fix spelling errors in multiple files (#34574)
* chore: fix spelling in .circleci

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in BUILD.gn

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in appveyor.yml

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in build

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in docs

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in lib

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in script

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in shell

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in spec

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in spec-main

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-06-16 16:46:11 +09:00
isailaandrei 21ef8501e7
feat: add panel support for BrowserWindow (#34388)
* feat: add NSPanel support for BrowserWindow

* change header guard to satisfy linter

* change panel wording in browser-window

* Revert "change panel wording in browser-window"

This reverts commit 6f3f80f94a.

* change wording in browser-window

* Update shell/browser/ui/cocoa/electron_native_widget_mac.mm

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

* Update shell/browser/ui/cocoa/electron_native_widget_mac.h

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

* Changed ScopedDisableResize class to allow for nesting

Co-authored-by: andreiisaila <andreiisaila@microsoft.com>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
2022-06-14 12:24:52 -04:00
Will Anderson 4f99e3e46c
docs: fix `did-frame-navigate` example in webFrameMain docs (#34419)
docs: fix did-frame-navigate example in webFrameMain docs
2022-06-06 14:49:14 +09:00
electron-roller[bot] 470396d6ac
chore: bump chromium to 104.0.5073.0 (main) (#34272) 2022-06-01 08:12:47 +02:00
Shelley Vohr 93b39b92b5
refactor: printToPDF should be headless (#33654) 2022-05-31 08:21:25 +02:00
John Kleinschmidt ba573f5583
feat: add support for HIDDevice.forget() (#34210)
* feat: add support for HIDDevice.forget()

* chore: remove whitespace

* chore: use `SetGetter` to serialize the render_frame_host

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

* fixup chore: use `SetGetter` to serialize the render_frame_host

* fixup after rebase

* fixup for crash on navigator.serial.getPorts()

* fixup for lint

Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
2022-05-23 15:13:18 -04:00
Keeley Hammond 38c21b7aca
revert: add first-instance-ack event to the `app.requestSingleInstanceLock()` flow (#34297)
fix: revert "feat: add first-instance-ack event to the `app.requestSingleInstanceLock()` flow"
2022-05-22 22:20:54 -07:00
mkiki01 04b33b319b
docs: added units to <webview>.print() pageSize option (#34088) 2022-05-17 11:59:24 -04:00
John Kleinschmidt 4f8a843606
docs: clarify added/removed events on device APIs (#34177) 2022-05-11 13:01:56 -07:00
Cheng Zhao 9483e714c4
feat: allow customizing browser data location (#33554)
* feat: redirect Electron/Chromium cache location

* fix: network services should also use browserData

* test: browserData

* chore: no need to explicitly create dir

* feat: browserData => sessionData

* test: check existings of specific items

* docs: add background on userData and sessionData

Co-authored-by: emmanuel.kimmerlin@thomsonreuters.com <emmanuel.kimmerlin@thomsonreuters.com>
2022-05-09 10:26:57 -04:00
Darshan Sen 03e68e2efe
fix: fix a crash in `safeStorage` on Linux (#33913)
On Linux, `isEncryptionAvailable()` was crashing instead of returning a
boolean before the 'ready' event was emitted by the app. The reason of
the crash is that [`CreateKeyStorage()`](https://source.chromium.org/chromium/chromium/src/+/main:components/os_crypt/os_crypt_linux.cc;l=74;drc=35be6215ec8f09e50176f36753c68f26c63d1885;bpv=1;bpt=0)
expects the config to be set but the function responsible for setting the
config, [`SetConfig()`](https://source.chromium.org/chromium/chromium/src/+/main:components/os_crypt/os_crypt_linux.cc;l=237;drc=35be6215ec8f09e50176f36753c68f26c63d1885;bpv=1;bpt=0),
is called only after the app is ready inside [`PostCreateMainMessageLoop()`](https://github.com/electron/electron/blob/main/shell/browser/electron_browser_main_parts.cc#L499).
So this changes `IsEncryptionAvailable()` to return `false` when the app
is not ready on Linux and uses that instead of the raw API in other
places like `EncryptString()` and `DecryptString()`.

Fixes: https://github.com/electron/electron/issues/32206
Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-05-09 09:38:53 -04:00
Raymond Zhao 3ba60de51d
docs: add missing ackCallback parameter (#34126) 2022-05-06 13:24:14 -07:00
Darshan Sen b5297ea8e2
docs: fix return type of setJumpList() in electron.d.ts (#33910)
Before:
```ts
setJumpList(categories: (JumpListCategory[]) | (null)): void;
```

After:
```ts
setJumpList(categories: (JumpListCategory[]) | (null)): ('ok' | 'error' | 'invalidSeparatorError' | 'fileTypeRegistrationError' | 'customCategoryAccessDeniedError');
```

Fixes: https://github.com/electron/electron/issues/33909
Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-04-28 03:15:23 -07:00
Darshan Sen 6733279037
docs: document when BrowserWindow and BrowserView can be used (#33696)
We already document such info for other APIs, like the 'screen' API in
f711fe6b57/docs/api/screen.md?plain=1#L7-L8.
So we should do the same thing for these ones too.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-04-18 10:11:44 -04:00
Samuel Attard 2d0ad04354
docs: update security guide regarding ctx isolation (#33807) 2022-04-18 10:09:54 -04:00
Shelley Vohr b66667b843
feat: allow `null` when subscribing notification (#33641)
* feat: allow null when subscribing notification

* docs: document null event
2022-04-13 22:02:33 +02:00
Shelley Vohr 3057ff0120
docs: note safeStorage.isEncryptionAvailable() needs ready event (#33724) 2022-04-12 12:47:15 -07:00
Shelley Vohr caddc83cfe
feat: implement chrome.tabs.reload (#33560) 2022-04-11 22:51:10 +02:00
Cheng Zhao 75ccec7996
docs: recommend setting e.returnValue (#33628) 2022-04-07 09:39:51 +02:00
David Sanders 0ac6d74536
docs: mark platform-specific functionality for BrowserWindow (#33512) 2022-04-04 18:00:45 +09:00
Cheng Zhao cbd06cd25e
docs: remove "cache" from app.getPath (#33509) 2022-03-31 09:33:38 +09:00
Mitchell Cohen a9296229c8
feat: add app.isHidden API for macOS (#32155)
* feat: add app.isHidden API

* Update docs/api/app.md

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

* fixed isHidden tests

* Update docs/api/app.md

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

* Update spec-main/api-app-spec.ts

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

Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
2022-03-29 21:34:07 -04:00
Samuel Attard 4c988a5a24
docs: fix type of 'value' param in setUserDefaults (#33481) 2022-03-29 14:47:06 -07:00
Joseph 6b66fea67d
docs: update heading level of webFrame.insertCSS (#33467) 2022-03-29 16:02:30 +09:00
Calvin f69b59effc
feat: add WCO title bar style setters (#33066)
* feat: add wco title bar style setters

* return after throwing
2022-03-24 20:02:45 -04:00
Jeremy Rose 4fdf8584ed
docs: fix SCA and postMessage links in web-frame-main.md (#33415) 2022-03-24 13:12:47 -04:00
Charles Kerr 0af2b8de73
docs: mark skipTaskbar as unsupported on Linux (#33226)
Fixes #33124.
2022-03-22 15:12:20 +09:00
Shelley Vohr db79734bfb
feat: support more color formats for `backgroundColor` (#31868) 2022-03-21 18:35:54 +01:00
Milan Burda 755feb4d81
feat: add nativeTheme.inForcedColorsMode (#32956) 2022-03-21 10:30:02 +01:00
David Sanders 7acb513ba6
docs: update links to Chromium source (#33309) 2022-03-17 13:45:55 +01:00
Jeremy Rose 4342b7ff55
chore: remove awkward semi-documented preloadURL WebPreference (#33228) 2022-03-16 16:23:41 -07:00
Jeremy Rose 02fe245521
docs: webFrame.insertCSS should mention options arg (#33274) 2022-03-16 10:56:20 -04:00
David Sanders fc7f38c7ce
docs: remove "marked" from process.getBlinkMemoryInfo() (#33263) 2022-03-16 11:51:56 +01:00
Milan Burda 2657383ea7
feat: allow setting code cache directory (#31154)
* feat: allow setting code cache directory

* chore: address review feedback

* chore: update docs

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

* chore: rewrite with base::Contains

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

Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-03-15 15:34:53 -05:00
CanadaHonk 37a904c299
docs: specify default for BrowserWindow's center option (#33264) 2022-03-15 10:48:25 -07:00
Kevin Ushey 3bc3896ee7
docs: fix documented return value for getFocusedWebContents (#33170) 2022-03-08 14:15:05 -05:00
Makonede 12aa991df2
Fix a typo (#33042) 2022-03-07 17:17:12 -05: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
Erick Zhao e9a43be9be
docs: add IPC doc (#32059)
* docs: add IPC doc

* fix: use "string" primitive

* use 'string' ipcrenderer

* use "number" primitive

* Update docs/tutorial/ipc.md

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

* Update docs/tutorial/ipc.md

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

* add code sample

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2022-02-09 11:00:05 -05:00
Jeremy Rose ce86e81aa6
docs: clarify meaning of cssOrigin (#32753) 2022-02-08 12:59:28 +01:00
Shelley Vohr 81fcd732c2
fix: savePage throw on relative paths (#32728) 2022-02-07 09:51:59 +01:00
Cheng Zhao c3d11e2ea2
test: fix failing tests of focus/blur events of WebContents (#32711) 2022-02-02 10:32:53 -05:00
Tobias Nießen 2289a52fb3
docs: fix typo in BrowserWindow description (#32667) 2022-02-01 12:47:49 +01:00
Samuel Maddock aeee9cfb78
feat: add focus and blur events for WebContents (#25873)
test: add focus and blur WebContents event tests

test: confirm that webcontents focus event is fired on browserwindow focus

fix: mac focus event test timeout
2022-02-01 19:28:57 +09:00
Paul Hollinsky e34d7f5d6f
docs: fix missing tag end in clipboard example (#32673) 2022-02-01 17:57:33 +09:00
Harshil jain d657cd8ed6
docs: Remove the latin words from doc (#32641) 2022-01-28 12:40:20 -08:00
Mikael Finstad 20ed5701e9
docs: update context bridge docs about Promises and Errors (#32533)
* Update context bridge docs about Promises

From my testing it doesn't remove Promises in nested objects,
also according to the test suite it does not:
80577a4f08/spec-main/api-context-bridge-spec.ts (L693)

* docs: Update docs for errors too
2022-01-27 20:23:40 +09:00
WeiZhiHuang 8ec81c1437
fix webRequest.onBeforeSendHeaders' attributes (#32474)
Co-authored-by: Wayne Huang <zjason4202@gmail.com>
2022-01-26 11:41:54 -05:00
Shelley Vohr 65bee9120f
docs: correct requestSingleInstanceLock parameter (#32595) 2022-01-25 12:57:57 -08:00
Michaela Laurencin 2f0d5651a9
feat: add WCO height option (#31222)
* feat: add WCO height option

* add docs and mac functionality

* add macOS functionality and height lowerbound

* Update docs/api/browser-window.md

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

* update macOS functionality

* add chromium related notes

* add test and fix pixel under button bug and fix typo

* revert changes to docs/api/frameless-window.md

* modify `useCustomHeight` calls

* update `useCustomHeight` and `getCurrentMargin`

* modify margin calculation

* fix minimum custom height on macOS

* Update window_buttons_proxy.mm

* fix specified traffic light positions

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-01-24 17:09:21 -05:00
Kevin 2fe5d0e1e8
feat: Added missing info to IAP transaction and product structures (#31739) 2022-01-24 08:55:18 -08:00
Matthew Rayermann d26d337bb8
feat: add rawHeaders to IncomingMessage (#31853)
* Add response.rawHeaders to docs for IncomingMessage

* Remove trailing spaces

* Implement raw headers, add tests

* Fix lint issues

* Add example from NodeJS docs

* Fix lint issue in doc example

* Add missing #
2022-01-24 11:46:15 -05:00
AN ac0d6bdb1e
Clarify will-redirect event doc (#32093) 2022-01-18 12:06:22 -05:00
David Sanders fac61122d5
docs: fix anchors for broken relative links (#32478) 2022-01-17 16:36:19 +09:00
Charles Kerr ddd66543f7
docs: explicitly allow string for MessageBoxOptions.icon (#32422)
Fixes #32390. See #19782 for context.
2022-01-13 10:30:15 +09:00
electron-roller[bot] b0f315a637
chore: bump chromium to 99.0.4767.0 (main) (#31986)
* chore: bump chromium in DEPS to 98.0.4726.0

* 3292117: Remove unneeded base/compiler_specific.h includes in //chrome.

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

* 3289198: Enables calculating line, word and sentence boundaries on the browser

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

* 3276176: Remove expired gdi-text-printing flag and associated code.

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

* 3240963: content: allow embedder to prevent locking scheme registry

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

* 3269899: Rename WebContentsImpl::GetFrameTree to GetPrimaryFrameTree

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

* chore: fixup patch indices

* 3276279: Enable -Wshadow by default for the "chromium code" config.

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

* 3279737: appcache: Remove WebPreference/WebSetting

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

* 3275564: [api] Advance API deprecation for APIs last marked in v9.6

https://chromium-review.googlesource.com/c/v8/v8/+/3275564

* 3261873: Clean up WebScriptSource constructors

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

* 3279346: appcache: Remove ConsoleMessage appcache field

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

* 3264212: Move legacy file loading to legacy_test_runner

https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264212

Both Persistence and UI have been removed from globals, but the issues they
seemed to be patching are no longer reproducible from what I can tell, and
so we can just delete these and re-evaluate if something surfaces.

* 3290415: x11: remove the USE_X11 define.

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

* chore: bump Chromium to 98.0.4728.0

* 3179530: Defer system calls in PrintingContext for OOP printing

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

* 3299445: Consolidate is_win conditionals in chrome/test/BUILD.gn.

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

* chore: update patch indices

* 3223975: Break PrintJobWorker OOP logic into separate class

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

* chore: bump chromium in DEPS to 98.0.4730.0

* 3279001: Remove support for font-family: -webkit-pictograph

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

* chore: fixup patch indices

* chore: bump chromium in DEPS to 98.0.4732.0

* chore: update patches

* chore: bump chromium in DEPS to 98.0.4734.0

* chore: bump chromium in DEPS to 98.0.4736.0

* chore: update patches

* chore: update printing patch for miracle ptr

* chore: add noexcept to fix clang error

* chore: bump chromium in DEPS to 98.0.4738.0

* chore: update patches

* chore: bump chromium in DEPS to 98.0.4740.0

* chore: bump chromium in DEPS to 98.0.4742.0

* chore: bump chromium in DEPS to 98.0.4744.0

* chore: bump chromium in DEPS to 98.0.4746.0

* chore: bump chromium in DEPS to 98.0.4748.0

* chore: bump chromium in DEPS to 98.0.4750.0

* chore: update patches

* 3293841: Remove File Handling permissions code

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

* chore: update patches

3311700: Move the PpapiPluginSandboxedProcessLauncherDelegate | https://chromium-review.googlesource.com/c/chromium/src/+/3311700

* 3289260: [CodeHealth]: Remove uses of Notification Service

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

* 3301600: Disable scripted print in fenced frames

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

* chore: add missing thread_restrictions headers

* 3305132: Rewrite most `Foo* field_` pointer fields to `raw_ptr<Foo> field_`.

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

* fix: add ppapi_sandbox header for linux

3311700: Move the PpapiPluginSandboxedProcessLauncherDelegate | https://chromium-review.googlesource.com/c/chromium/src/+/3311700

* chore: manually bump chromium in DEPS to 98.0.4757.0

* chore: update patches

* 3321044: Remove DictionaryValue::Clear()
 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3321044

* chore: update printing.patch
Refs:
- 3304556: [code health] Remove notification observation from PrintJob. | https://chromium-review.googlesource.com/c/chromium/src/+/3304556
- 3305095: [code health] Remove NotificationService from PrintViewManagerBase. | https://chromium-review.googlesource.com/c/chromium/src/+/3305095

* build: add v8-embedder-state headers to GN patch

* chore: bump chromium in DEPS to 99.0.4767.0

* chore: update patches

* chore: rename CookiePartitionKeychain

...to CookiePartitionKeyCollection

* chore: update video consumers

* refactor: use newer base::Value API

* 3232598: Convert net::DnsOverHttpsServerConfig into a class | https://chromium-review.googlesource.com/c/chromium/src/+/3232598

* 3327865: Remove the default WebContentsUserData ctor. | https://chromium-review.googlesource.com/c/chromium/src/+/3327865

* 3302814: DevTools: Add getPreference binding | https://chromium-review.googlesource.com/c/chromium/src/+/3302814

* 3301474: [tq][runtime] Use build flags for JS context promise hooks | https://chromium-review.googlesource.com/c/v8/v8/+/3301474

* oops 😵‍💫

* 3272411: Reland "base/allocator: Enable PartitionAlloc-Everywhere on macOS" | https://chromium-review.googlesource.com/c/chromium/src/+/3272411

build: turn PartitionAlloc back off on mac for now

* fix: WCO method got renamed

* 3344749: Revert "Stop using NSRunLoop in renderer process"

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

* 3288746: [serial] Fix BluetoothSerialDeviceEnumerator threading issues.

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

* Revert "3288746: [serial] Fix BluetoothSerialDeviceEnumerator threading issues."

This reverts commit 5cc69f102e43ca72ac9ef45063711bcc7d849740.

* chore: disable serial device enumerator sequence dcheck

* fix: comment out line in DeviceService dtor

* fixup! 3279001: Remove support for font-family: -webkit-pictograph

* fixup! 3279346: appcache: Remove ConsoleMessage appcache field

* chore: update patches after rebase

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: VerteDinde <khammond@slack-corp.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2022-01-10 17:31:39 -05:00
Raymond Zhao 746927c972
feat: Add `first-instance-ack` event to the `app.requestSingleInstanceLock()` flow (#31460)
* feat: Add onFirstInstanceAck event for requestSingleInstanceLock

* Add tests

* Apply patch fix

* Add back missing docs

* Rebase

* Listen for exit earlier in test

* Rebase
2022-01-10 11:54:46 -05:00
Evan Hahn ef058892bb
docs: clarify case insensitive dictionary hosting (#32222)
You must either (1) have a case-insensitive file server (2) upload files in both casings. This improves the docs to clarify that.

[0]: https://github.com/electron/electron/issues/22482#issuecomment-593617375
2022-01-10 11:07:46 +01:00
David Sanders bd861e5079
docs: fix note for `will-move` event (#32362) 2022-01-10 11:02:16 +01:00
Milan Burda 6d8a858897
docs: left is a valid mode in contents.openDevTools() options (#32372) 2022-01-10 10:50:18 +01:00
Mitchell Cohen 5af6b898d9
feat: add Substitutions menu roles on macOS (#32024) 2022-01-06 10:41:28 -08: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
MikeBusuttil c1c710bc01
docs: improve BrowserView example (#32098)
* working example

previous example not beginner-friendly

* Update browser-view.md

Co-authored-by: Cheng Zhao <github@zcbenz.com>
2022-01-06 12:09:36 +09:00
Maciej Krawczyk 84f1d78558
docs: correct webFrame description (#32205)
The current description incorrectly states that the webFrame export represents the top frame but it actually represents the current frame.
2022-01-04 10:12:55 +09:00
Duncan Hewett 2c700da4de
docs: add Bugsnag as a 3rd party crash server (#32053) 2022-01-03 14:48:15 -05:00
Samuel Attard a11f5cbb27
fix: ensure bluetooth devices are not returned by default (#32178) 2021-12-15 11:46:48 -08:00
Cheng Zhao 35ac7fb8e6
fix: window.open not overriding parent's webPreferences (#32057)
* fix: window.open not overriding parent's webPreferences

* test: remove "nativeWindowOpen: false" from renderer tests
2021-12-06 12:54:14 +09:00
Milan Burda e6b1d95a1c
docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
Keeley Hammond bf7b245fa0
fix: change cookie default from NO_RESTRICTION to LAX_MODE (#31800)
* fix: change default from NO_RESTRICTION to LAX_MODE

* chore: update cookie docs, redirect tests
2021-11-15 09:20:04 -06:00
John Kleinschmidt 5899a72df9
fix: clipboard.read() to recognize custom types (#31623) 2021-11-01 10:00:36 -04:00
Erick Zhao 3193d7e99b
docs: link to Apple developer docs for `app.ready` event (#31583)
Changes some links around. There was no link for `NSUserNotification`, and
`UNNotificationResponse` incorrectly linked to our own `NotificationResponse`
API structure doc.
2021-10-27 09:06:01 +09:00
Mitchell McCaffrey 23cdf65c53
feat: add webContents.getMediaSourceId() method (#31204)
* feat: add webContents.getMediaSourceId() method

* fix: account for null frame_hosts in webContents.getMediaSourceId()

* fix: move webContents.getMediaSourceId definition to be more organised

* fix: move webContents.getMediaSourceId implementation

* fix: move webContents.getMediaSourceId docs
2021-10-25 20:03:59 -04: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
Milan Burda 3332420886
docs: win.getParentWindow() returns BrowserWindow | null (#31548) 2021-10-25 11:10:33 -04:00
Erick Zhao c3a8ad254a
docs: add window customization guide (#31054)
* docs: add window customization guide

* fixes

* Update docs/api/browser-window.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/api/browser-window.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/fiddles/windows/manage-windows/frameless-window/index.html

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/window-customization.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* fix code fence

Co-authored-by: Mark Lee <malept@users.noreply.github.com>
2021-10-19 09:58:35 +09:00
universalstrapping 14736c5f30
Avoid Undefined Variable In printToPdf Example (#31455) 2021-10-19 09:53:59 +09:00
Raymond Zhao db0a152bc1
feat: Add data parameter to `app.requestSingleInstanceLock()` (#30891)
* WIP

* Use serialization

* Rebase windows impl of new app requestSingleInstanceLock parameter

* Fix test

* Implement posix side

* Add backwards compatibility test

* Apply PR feedback Windows

* Fix posix impl

* Switch mac impl back to vector

* Refactor Windows impl

* Use vectors, inline make_span

* Use blink converter

* fix: ownership across sequences

* Fix upstream merge from Chromium

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2021-10-14 21:32:32 -04:00
Maxime Serrano b2a2b077da
fix: also pass securityOrigin to media permissions request handler (#31357) 2021-10-13 17:10:12 -04:00
Samuel Attard 014ebbd6fa
feat: add commandLine.removeSwitch (#30933)
* feat: add commandLine.removeSwitch

In some cases apps may want to remove Chromium command line switches to avoid certain Chromium behaviors being used, E.g. remote-debugging-port or gpu-launcher

* fix: add missing removeSwitch to app.ts

Co-authored-by: Milan Burda <milan.burda@gmail.com>
2021-10-06 16:45:58 -04:00
John Kleinschmidt d6de243837
chore: refactor persisting permission granted to serial ports (#31181) 2021-10-06 16:18:00 -04:00
Milan Burda 36ed216040
docs: add missing 'context-menu' event to webview-tag.md (#31277) 2021-10-05 20:42:09 -07:00
Jeremy Rose 4fd7c2adcd
feat: make desktopCapturer main-process-only (#30720)
* feat: make desktopCapturer main-process-only

* remove --enable-api-filtering-logging

* remove test

* merge lib/browser/api/desktop-capturer.ts with lib/browser/desktop-capturer.ts

* remove desktop-capturer-get-sources event

* fix specs

* getSources needs to be async

Co-authored-by: Milan Burda <milan.burda@gmail.com>
2021-10-04 12:16:00 +09:00
Tobias Nießen e53bd1b72a
fix: fix typo in description of secureDnsMode (#31255) 2021-10-04 09:57:19 +09:00
John Kleinschmidt 6aece4a83d
feat: add support for WebHID (#30213)
* 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>
2021-09-23 20:00:11 +09:00
Milan Burda 77579614e0
feat: add width option to dialog.showMessageBox() (#30474) 2021-09-23 19:56:14 +09:00
Black-Hole e39a1d2ea0
fix: startDrag params type incorrect (#31034) 2021-09-23 17:07:39 +09:00
Samuel Maddock 70c534fd14
feat: add frame to context-menu event params (#30831)
* feat: add frame to context-menu event params

* doc: rephrase frame description
2021-09-22 08:52:49 +09:00
Shelley Vohr 629d8913f6
fix: maximized state calculation for non-resizable windows (#30989) 2021-09-21 12:04:32 +02:00
Milan Burda 92bff00d43
feat: add isMainFrame argument to 'certificate-error' event (#30879) 2021-09-21 15:49:15 +09:00
Erick Zhao 54b44584fa
chore: correct hierarchy of BrowserWindow headings (#30905)
* chore: correct hierarchy of BrowserWindow headings

* Update docs/api/browser-window.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/api/browser-window.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/api/browser-window.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

Co-authored-by: Mark Lee <malept@users.noreply.github.com>
2021-09-15 09:41:37 +09:00
Finn Behrens 6a1726576d
docs: Update windows info for auto-updater (#30538)
Squirrel.Mac can be served from a static host as well.
2021-09-07 17:03:56 +02:00
Isaac Taylor 4a2f41ee58
docs: updated webview tag documentation to accurately reflect preload behavior with asar archives (#30768) 2021-09-06 17:00:17 +09:00
Samuel Maddock 4d89174b41
feat: add 'dom-ready' event to WebFrameMain (#29290) 2021-09-01 15:21:15 -07:00
electron-roller[bot] 49e62f1261
chore: bump chromium to 95.0.4629.0 (main) (#30676)
* chore: bump chromium in DEPS to 95.0.4620.0

* chore: update patches

* 3076261: Move args_ to private in ExtensionFunction

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

* [GURL -> SiteForCookies] content/public/browser/content_browser_client.h

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

* chore: fix -Wunreachable-code-return in node

* Tracing to diagnose ContentScriptTracker-related bad message reports

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

* chore: bump chromium in DEPS to 95.0.4621.0

* chore: update patches

* Remove title from the URL format on Windows.

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

* chore: bump chromium in DEPS to 95.0.4623.0

* Revert "chore: disable v8 oilpan"

This reverts commit 5d255cf1d8e8efbb906047937a713279e5f800d0.

(cherry picked from commit ba5cde4da2)

* Change file paths in network context params to be relative.

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

* Code Health: Rename/replace content::WebUI::RegisterMessageCallback().

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

* Migrate CanExecuteContentScriptSync to Mojo

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

* chore: update patches

* remove unreachable code

* Revert "Revert "chore: disable v8 oilpan""

This reverts commit fef495c0294e21760df51bddb5f7bf1ec9ed5f1e.

* fixup mas patch

* Reland "[include] Split out v8.h"

https://chromium-review.googlesource.com/c/v8/v8/+/3113629

* chore: bump chromium in DEPS to 95.0.4624.0

* chore: bump chromium in DEPS to 95.0.4625.0

* chore: bump chromium in DEPS to 95.0.4626.0

* 3033504: Pass NavigationDownloadPolicy in CreateNewWindowParams

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

* 3058038: Introduce TestPrintingContext & test UpdatePrintSettings

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

* 3114943: [Conditional Focus][#4] Add tests and remove flag gating

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

* chore: update patch indices

* chore: bump chromium in DEPS to 95.0.4627.0

* chore: update patches

* 3093591: ozone: webpagepopups: calculate anchor for menu bounds. 4/*

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

* 3110414: [PA] Remove the leading cookie

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

* chore: update patches

* 3076261: Move args_ to private in ExtensionFunction

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

* 3113629: Reland "[include] Split out v8.h"

https://chromium-review.googlesource.com/c/v8/v8/+/3113629

* chore: bump chromium in DEPS to 95.0.4628.0

* chore: update patches

* chore: bump chromium in DEPS to 95.0.4629.0

* chore: update patches

* Fix chrome root store codegen for cross-compile builds.

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

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: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-09-01 15:55:07 -04:00
Jeremy Rose dd7aeda6fb
feat: add app.configureHostResolver (#30576) 2021-08-31 11:55:30 -07:00
Samuel Maddock 352ac21413
feat: add webContents.fromDevToolsTargetId() (#29399)
* feat: add webContents.fromDevToolsTargetId()

* refactor: avoid using FromOrCreate
2021-08-27 14:01:24 -07:00
Milan Burda 501ac15b1d
feat: add <webview>.sendToFrame() / frameId to 'ipc-message' event (#30451) 2021-08-25 09:46:46 +02:00
Samuel Attard be43996d35
docs: explain the null webContents case in permission checks (#30645)
* docs: explain the null webContents case in permission checks

* Update docs/api/session.md

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

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2021-08-25 09:41:56 +09:00
Shelley Vohr 32194f0f71
fix: crash when using TouchBarScrubber arrow button (#30661) 2021-08-24 18:28:57 +02:00
electron-roller[bot] 5513e66982
chore: bump chromium to 95.0.4612.5 (main) (#30503)
* chore: bump chromium in DEPS to 94.0.4604.0

* build: 3-way merge of chromium patches

* chore: bump chromium in DEPS to 94.0.4605.0

* build: 3-way merge of chromium patches

* 3076040: Reland Remove delete_children RemoveAllChildViews arg

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

* 3069287: Remove the remaining uses and delete the deprecated API

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

* 2297212: Replace RemoveWithoutPathExpansion(.*, nullptr) with Value::RemoveKey()

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

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

* 3082756: Change transport_security_persister_path param to be a path to a file.

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

> this CL intentionally changes the name of the parameter
> in the network context parameters and the order of the constructor
> parameters to ensure all callers update their code to pass a full
> file path rather than a path to a directory.

The 'path' in this diff is already an absolute path, coming from
`CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &path_));` at
08ff1c2cbf/shell/browser/electron_browser_context.cc (L126)

* iwyu: network::mojom::HttpRawHeaderPair

* fixup! 3076040: Reland Remove delete_children RemoveAllChildViews arg

Missed one.

* 2999884: CodeHealth: Remove DictionaryValue::GetStringWithoutPathExpansion

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2999884
(example of replacing GetStringWithoutPathExpansion() w/FindStringKey())

Also: https://chromium-review.googlesource.com/c/chromium/src/+/3060296
(removal of DictionaryValue::GetStringWithoutPathExpansion)

* 3059260: Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure

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

We had both of these in a 'disable_features' list. Since these feature have
been removed upstream, remove them from our disable list, too.

IMPORTANT: this commit should not be backported to older branches that
still have these features, because doing so would un-disable them.

* 2920890: Load reroute_info from download in-progress and history db back into DownloadItem.

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

* 3039323: [Clipboard API] Clipboard Custom Formats implementation Part 5.

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

* chore: bump chromium in DEPS to 94.0.4606.0

* 3084502: Add a new PrintRasterizePdfDpi policy.

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

* chore: update patches

* chore: bump chromium in DEPS to 94.0.4606.3

* chore: bump chromium in DEPS to 95.0.4608.0

* chore: bump chromium in DEPS to 95.0.4609.0

* [DevTools] Remove report_raw_headers from network::ResourceRequest

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

* Remove content::WebContentsObserver::OnInterfaceRequestFromFrame

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

* Disable kDesktopCaptureMacV2

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

* Add a new PrintRasterizePdfDpi policy.

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

* chore: update patches

* chore: bump chromium in DEPS to 95.0.4609.3

* disable `use_lld` for macos

* chore: update patches

* Linux: use chrome_crashpad_handler instead of crashpad_handler

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

* chore: fix lint

* Revert "[DevTools] Remove report_raw_headers from network::ResourceRequest"

This reverts commit 28f4da1582d046e96cb58f3cbb590503e89dfd0d.

* [DevTools] Remove report_raw_headers from network::ResourceRequest (Attempt #2)

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

* DCHECK that predictor always has a non-empty NetworkIsolationKey.

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

* Remove --no-untrusted-code-mitigations from //content and //gin

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

* fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure

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

* fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure

* Convert PrintManager to RenderFrameHostReceiverSet.

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

* chore: bump chromium in DEPS to 95.0.4612.5

* chore: disable v8 oilpan

* [Compiler] Remove untrusted code mitigations.

https://chromium-review.googlesource.com/c/v8/v8/+/3045704

* Remove most FTP logic from services/network.

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

* Rename scale_factor.h -> resource_scale_factor.h

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

* [GURL -> SiteForCookies] extensions/

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

* breadcrumbs: add desktop entry point

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

* Move args_ to private in ExtensionFunction

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

* chore: iwyu

* fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure

* Disable kDesktopCaptureMacV2

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

* fixup! [Compiler] Remove untrusted code mitigations.

* fixup! Disable kDesktopCaptureMacV2

* Revert "chore: disable v8 oilpan"

This reverts commit 5d255cf1d8e8efbb906047937a713279e5f800d0.

* Reland "chore: disable v8 oilpan"

This reverts commit 1c252765b07a205560e7b5eed06de2605336e2d8.

The previous revert was to test on which platforms did the
heapsnapshot test actually fail.

* [Clipboard API] Clipboard Custom Formats implementation Part 5.

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

* Convert ExtensionFrameHost to RenderFrameHostReceiverSet.

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

* Convert PDFWebContentsHelper to RenderFrameHostReceiverSet.

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

* [Underscore Migration] Migrate ui/legacy

https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093160

* chore: remove unknown permission error

* chore: fix lint

* chore: ignore -Wunreachable-code-return for node deps/

* fixup! chore: ignore -Wunreachable-code-return for node deps/

* fix: windows build

* fix: build dependency

Dependency was missed in cbeae20438

* 3108669: arm,dsp: Fix 8bpp Dct64_NEON().

https://chromium-review.googlesource.com/c/codecs/libgav1/+/3108669

* chore: revert libgav1 roll

* Revert "3108669: arm,dsp: Fix 8bpp Dct64_NEON()."

This reverts commit 7ed3132312.

* Revert "chore: revert libgav1 roll"

This reverts commit 084a490d29.

* chore: revert clang roll

* chore:  Fix -Wunreachable-code-aggressive warnings in arm and arm64 code

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: mlaurencin <mlaurencin@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-08-23 20:52:17 -04:00
Milan Burda aad1c0d493
feat: add <webview> 'did-redirect-navigation' event (#30457) 2021-08-23 10:26:00 -04:00
Erick Zhao 655b614ecd
docs: remove unused Desktop Environment Integration doc (#30577)
* docs: remove unused Desktop Environment Integration doc

* Update docs/api/app.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/api/app.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

Co-authored-by: Mark Lee <malept@users.noreply.github.com>
2021-08-19 08:34:34 +09:00
Erick Zhao 6669abf38d
docs: clarify platform-specific usage of the acceptFirstMouse option (#30522) 2021-08-16 14:13:02 +02:00
Samuel Attard 439e83de6c
refactor: remove all usages of the legacy request module (#30492)
* Replaces request with got
* Replaces nugget with got streams
* Replaces request in docs with got
* Upgrades dugite to drop requests dependency
2021-08-12 10:34:49 -07:00
Michaela Laurencin 41646d1168
feat: enable windows control overlay on Windows (#29600)
* rebase "feat: enable windows control overlay on Windows"

* correct compilation error

* fix linting errors

* modify includes and build file

* change `hidden` option to `overlay`

* add patch to fix visual layout

* add button background color parameter

* add button text color parameter

* modify `overlay` in docs and modify button hover/press transition color

* change `text` to `symbol`

* remove todo and fix `text` replacement

* add new titleBarOverlay property and remove titleBarStyle `overlay`

* update browser and frameless window docs

* remove chromium patches

* chore: update patches

* change button hover color, update trailing `_`, update test file

* add dchecks, update title bar drawing checks, update test file

* modify for mac and linux builds

* update docs with overlayColor and overlaySymbolColor

* add corner and side hit test info

* modify docs and copyright info

* modify `titlebar_overlay_` as boolean or object

* move `title_bar_style_ to `NativeWindow`

* update docs with boolean and object titlebar_overlay_

* add `IsEmpty` checks

* move get options for boolean and object checks

* fix linting error

* disable `use_lld` for macos

* Update docs/api/frameless-window.md

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

* Update docs/api/frameless-window.md

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

* Update docs/api/frameless-window.md

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

* Apply docs suggestions from code review

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

* modify `true` option description `titleBarOverlay`

* ci: cleanup keychain after tests on arm64 mac (#30472)

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-08-11 14:07:36 -04:00
Milan Burda 4f739d7837
docs: add missing <webview> event documentation (#30450) 2021-08-10 10:12:54 +09:00
nibbleswap 590858a38d
docs: fix camelcase in menu example (#30341)
* docs: fix camelcase in menu example and add hint to deal with TS error

hideothers -> hideOthers (the TS compiler caught this)
The TypeScript compiler also did not like the pattern used to
switch between platforms for submenus was loosing the type information
of the literal constants and generalized them as strings which
conflicts with the type definition of MenuItemConstructorOptions.

* docs: Fix spelling, added hint to TypeScript

Without explicitly stating the type for the const template TypeScript does not create a
with the correct shape due to generalization to strings.

* remove ts hints

Co-authored-by: a <a@b>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
2021-08-10 10:01:39 +09: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
Jeremy Rose 40e76dca07
feat: switch to crashpad on linux (#30278) 2021-08-03 14:01:12 -07:00
Biru Mohanathas ced2e8779f
feat: Allow detection of MITM HTTPS proxies like ZScaler (#30174)
* feat: Allow detection of MITM HTTPS proxies like ZScaler

For security purposes, Figma heavily restrics the origins that are
allowed to load within our Electron app. Unfortunately some corporate
environments use MITM proxies like ZScaler, which intercepts our
connection to `https://www.figma.com` and serves a redirect to e.g.
`https://gateway.zscloud.net` before finally redirecting back to
`https://www.figma.com`.

In order to detect this situation and handle it gracefully, we need to
be able to know whether or not the certificate for our own origin
(`https://www.figma.com`) is chained to a known root. We do this by
exposesing `CertVerifyResult::is_issued_by_known_root`.

If the certification verification passed without the certificate being
tied to a known root, we can safely assume that we are dealing with a
MITM proxy that has its root CA installed locally on the machine. This
means that HTTPS can't be trusted so we might as well make life easier
for corporate users by loosening our origin restrictions without any
manual steps.

* Tweak docs wording
2021-08-02 10:24:58 +09:00
John Kleinschmidt 9cc1b55663
chore: remove experimental from navigator.serial implementation (#30237) 2021-07-30 08:57:22 +09:00
Anders Kaseorg 1c95d30c0f
fix: Add missing items to menuItem.role documentation (#30217) 2021-07-28 08:45:06 +02:00
Jeremy Rose ceebae170e
feat: partially support chrome.tabs.update (#30069) 2021-07-27 13:36:22 -07:00
Cheng Zhao 05ba6359d0
feat: add signal option to dialog.showMessageBox (#26102)
* mac: add dialog.closeMessageBox API

* win: Implement dialog.closeMessageBox

* mac: Return cancelId with closeMessageBox

* gtk: Implement dialog.closeMessageBox

* win: Fix 32bit build

* win: Reduce the scope of lock

* fix: Build error after rebase

* feat: Use AbortSignal to close message box

* chore: silently handle duplicate ID

* win: Add more notes about the threads

* chore: apply reviews

* fix: base::NoDestructor should be warpped in function

* chore: fix style on windows
2021-07-15 07:59:27 +09:00
Utkarsh Dixit b2da2f759a
docs: add runtime.reload as supported extension api (#29925) 2021-07-14 15:37:53 -07:00
Milan Burda c0995b8dff
docs: add <webview> 'did-attach' event documentation (#29899) 2021-07-14 20:59:20 +09:00
Jeremy Rose 4d0475c9ce
feat: expose location and modifiers on before-input-event (#29850)
* feat: expose location and modifiers on before-input-event

* lint
2021-07-14 20:50:02 +09:00
1akshat1 d267f979b7
feat: continue-activity event is extended to support webpageURL property (#30042)
Co-authored-by: Akshat Malik <amalik@microstrategy.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-07-13 13:21:33 -07:00
Milan Burda 53386914e1
docs: move webRequest filters definition to structures/web-request-filter.md (#29900) 2021-07-08 00:20:08 -07:00
Milan Burda 635ed5a6e3
feat: add missing resourceType conversions for webRequest listener details (#29902) 2021-07-08 00:19:16 -07:00
Jeremy Rose 550d3c11a8
docs: mention contextIsolation in ipc-main example (#29918) 2021-07-06 10:27:35 -07:00
electron-roller[bot] 2585e6d5fa
chore: bump chromium to 93.0.4566.0 (main) (#29980)
* chore: bump chromium in DEPS to 93.0.4562.0

* chore: update patches

* [base] Made Value::Take{Dict,List}() rvalue ref-qualified.

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

* Revert "Reland "Roll src/buildtools/third_party/libc++/trunk/ 8fa879467..79a2e924d (426 commits)""

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

This reverts commit 9691d6c265 and 797723ec83

* Pass gfx::Insets to GetHTComponentForFrame

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

* chore: bump chromium in DEPS to 93.0.4563.0

* [Clipboard API] Clipboard Custom Formats implementation Part 2.

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

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4564.0

* chore: bump chromium in DEPS to 93.0.4565.0

* chore: update patches

* Prevent use of base::NoDestructor for trivially-destructible types

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

* chore: update patches

* fixup! [Clipboard API] Clipboard Custom Formats implementation Part 2.

* chore: bump chromium in DEPS to 93.0.4566.0

* chore: update patches

* chore: add missing header

* ci: do not run clipboard tests on WOA

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-07-06 08:17:13 -04:00
Antón Molleda 20c1f504ae
docs: remove `Experimental` from `contextBridge.exposeInMainWorld` (#29985)
The API has been around for about 3 years. It should no longer be
considered experimental.
2021-07-05 08:46:47 +09:00
John Kleinschmidt 1f8a46c9c6
feat: enable window controls overlay on macOS (#29253)
* feat: enable windows control overlay on macOS

* address review feedback

* chore: address review feedback

* Address review feedback

* update doc per review

* only enable WCO when titleBarStyle is overlay

* Revert "only enable WCO when titleBarStyle is overlay"

This reverts commit 1b58b5b1fc.

* Add new titleBarOverlay property to manage feature

* spelling fix

* Update docs/api/frameless-window.md

Co-authored-by: Samuel Attard <sam@electronjs.org>

* Update shell/browser/api/electron_api_browser_window.cc

Co-authored-by: Samuel Attard <sam@electronjs.org>

* update per review feedback

Co-authored-by: Samuel Attard <sam@electronjs.org>
2021-07-01 15:25:40 -04:00
Samuel Attard da9261497e
feat: add MenuItem.userAccelerator property (#26682)
* feat: add MenuItem.userAccelerator property

This allows folks to read the user-assigned accelerator that macOS users can provide in system preferences. Useful for showing in-app shortcut help dialogs, you need to know if the accelerator you provided is not being used in favor of a user assigned one.

* chore: update syntax

* chore: add safety check for command index being -1
2021-06-29 16:28:16 -07:00
David Sanders 9142563748
docs: remove requestHeaders in webRequest.onHeadersReceived (#29907) 2021-06-28 15:52:06 -07:00
Jeremy Rose c5066cce22
docs: fix broken markdown in dialog.md (#29782) 2021-06-22 09:49:30 -07:00
Charles Kerr 8ccab4ce91
feat: bring --enable-logging functionality in line with Chromium (#25089)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-06-17 14:17:25 -07:00
kdau 226f2a9a56
fix setWindowOpenHandler call syntax (#29551) 2021-06-16 16:16:18 +09:00
Samuel Attard 81795744cf
fix: ensure the typescript definitions only export correct value types (#28712)
* fix: ensure the typescript definitions only export correct value types

In typescript there are two main types of "types" you can export, value types (class, const) and definition types (type, interface).  The typescript compiler will let anything declared via const or class be used as a value.  Unfortunately we were exporting a bunch of things (see the diff) as class/const when they weren't actually exported values. This lead to typescript being happy but the runtime throwing errors (not something we want).

This change passes "exported-in" context through our docs, to the parser and then to the definitions generator to ensure we only mark things as exported in the ts defs that we actually export.

Fixes #22167

* chore: update typescript-defs

* chore: update typescript-defs

* chore: fix bad typescript in IPC test

* docs: test rendering of new syntax

* chore: update per feedback, use same syntax but with 'this is not exportedd' line
2021-06-15 13:50:31 -07:00
David Sanders 7019713126
docs: use relative links within docs (#29651) 2021-06-14 14:02:23 -05:00
Samuel Attard 8446ce1fc7
feat: add new imageAnimationPolicy webpref and webContents setter (#29095) 2021-06-08 11:00:22 +09:00
David Sanders bb6903543c
docs: link to IncomingMessage (#29457) 2021-06-03 14:54:33 +09:00
Sergio Padrino abf6f5c8ba
feat: add new runningUnderARM64Translation property to detect x64 translated apps running on Windows ARM (#29168)
* feat: add new runningUnderARM64Translation property to detect x64 translated apps running on Windows ARM

* docs: add documentation for the new runningUnderARM64Translation property

* refactor: clean up `IsRunningUnderARM64Translation` Windows implementation

* Return false if IsWow64Process2 doesn't exist

* Emit deprecation warning in runningUnderRosettaTranslation
2021-06-02 16:16:33 +09:00
Samuel Maddock f9d2a7077e
feat: include resize edge with will-resize event (#29199)
* feat: emit resize edge with will-resize event

fix: wparam type

fix: private member usage on mac

docs: will-resize event edge option

refactor: 'info' -> 'details' for better type gen

* Update docs/api/browser-window.md

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* Update docs/api/browser-window.md

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-06-02 11:37:10 +09:00
Samuel Attard f01e35f4ea
feat: add support for Blob's going over the ctx bridge (#29247) 2021-05-26 10:34:29 -07:00
Erick Zhao 6330f8be9f
docs: rework introduction docs (#29062)
* docs: add 'introduction' doc

* note

* wip

* updates

* wip

* wip

* wip

* add missing code

* wip

* add image for chrome processes

* process model wip

* finish line?

* update links

* Update docs/README.md

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

* Update docs/tutorial/introduction.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/quick-start.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/process-model.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/process-model.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/process-model.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/quick-start.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/quick-start.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/quick-start.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/tutorial/quick-start.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* address code review

* Update docs/tutorial/application-distribution.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* remove wip doc

Co-authored-by: Cheng Zhao <github@zcbenz.com>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
2021-05-24 11:32:36 +09:00
Tabea4 014bdc9f8a
docs: option title for showSaveDialog is not supported for some platforms (#28747) 2021-05-19 09:44:17 +02:00
Thomas Kainrad af426cbdab
Update accelerator.md (#29193)
`Meta` is a valid alternative for `Super` and should be listed as an available modifier.
2021-05-19 09:52:06 +09:00
Noelle Leigh 5e6f8349ec
docs: --force-fieldtrials was h2 rather than h3 (#29161)
All the other argument headers were h3 (`###`) but `--force-fieldtrials` was h2 (`##`) for some reason. 
I changed it to make it consistent with the others.
2021-05-14 18:32:21 -07:00
Cheng Zhao 4073599f59
fix: remove background color hack in vibrancy (#29114) 2021-05-14 11:05:34 +02:00
PalmerAL 5233feaef9
docs: Improve description of findInPage options (#29077)
* docs: improve webContents.findInPage description

* docs: improve webview.findInPage description
2021-05-13 11:12:08 +09:00
Erick Zhao 8f8708680f
docs: rework sandbox guide (#28978)
* docs: rework sandbox guide

* update doc name

* add missing comment to code sample

* Update docs/tutorial/sandbox.md

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* Update docs/tutorial/sandbox.md

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* Update docs/tutorial/sandbox.md

Co-authored-by: Biru Mohanathas <birunthan@mohanathas.com>

* load https in the examples

* change `process` docs to Electron's

* remove bit on chrome://sandbox page

* Update docs/tutorial/sandbox.md

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

* Update docs/tutorial/sandbox.md

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

* clarify sandbox default posture

* clarify tasks sandboxed renderers need ipc for

* clarify polyfilled preload environment

* emphasize that --no-sandbox is bad

* clarify preload polyfill `require`

* format markdown references properly

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Biru Mohanathas <birunthan@mohanathas.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-05-06 20:53:55 +09:00
Hamish Macpherson 9fb3a49c7c
docs: link to `BrowserView` from `webview` page (#28942)
* docs: Link to `BrowserView` from `webview` page

* fix relative link
2021-05-05 16:12:16 +09:00
Rajdeep Chatterjee dd80952877
docs: Added loadFile instead of loadURL in BrowserWindow documentation example (#28829)
* Added loadFile instead of loadURL in the example

For loading a local file the loadFile API is a better way to load any html file in the Renderer process.

Have changed it in the example.

* Changed backticks to single quote to correct for linting error

In order to correct the linting error reported by the bot, I have changed backticks to single quote in the example.
2021-05-03 13:56:33 -04:00
Erick Zhao 18a76c6b9d
docs: uniformize module API doc format (#28920)
This PR ensures that all API modules are present in the README doc,
as there were a couple missing. It also formats all modules to contain
a level-1 heading and a blockquote description.
2021-04-29 09:56:31 +02:00
Michael Kozakov c37c9adbe2
docs: Add clarification for Visual Zoom behavior (#28860)
* Add clarification for visual zoom documentation
2021-04-28 17:20:47 -04:00
Erick Zhao 0b42316803
docs: remove `api/locales` page (#28911)
This page is just a table writing out the contents of an array in
the Chromium source code. We don't actively maintain it, and
it's only referenced in one API, so it makes sense to just
link directly to the code here.
2021-04-28 13:11:50 -07:00
Samuel Attard fa61e3b119
feat: add session.storagePath to get path on disk for session data (#28665) 2021-04-27 09:54:28 -07:00
Jeremy Rose 583660a85a
docs: fix unintentional emoji in win.getMediaSourceId description (#28767) 2021-04-22 10:56:25 -07:00
Samuel Maddock 43d27cc4d1
feat: add WebFrameMain.visibilityState (#28706)
* feat: add WebFrameMain.visibilityState

* docs: mention other page visibility APIs

* test: delay visibilityState check after hiding

* test: add waitForTrue to avoid flaky visibilityState test

* refactor: waitForTrue -> waitUntil
2021-04-22 12:00:58 -04:00
Samuel Attard 79077f6df9
chore: remove app.allowRendererProcessReuse (#26874) 2021-04-21 13:59:11 -07:00
Jeremy Rose 4ca518468d
feat: remove BrowserWindow option inheritance (#28550) 2021-04-21 10:55:17 -07:00
Shelley Vohr 11199d8824
feat: add BrowserWindow.isFocusable() (#28642) 2021-04-21 12:32:19 +02:00
Jeremy Rose e12a3cb59c
feat: remove deprecated additionalFeatures (#28548) 2021-04-19 15:46:54 -07:00
Samuel Attard 400d7c4bce
chore: update ts parser for description comment fixes and generic types (#28709)
* chore: update ts parser for description comment fixes

* docs: strongly type the getUserDefault API

* spec: add getUserMedia type assertions to smoke run
2021-04-19 11:44:58 -07:00
Electron Bot 22a70eb803
chore: bump chromium to 92.0.4475.0 (master) (#28462)
* chore: bump chromium in DEPS to 91.0.4464.0

* chore: rebuild chromium/dcheck.patch with import-patches -3

Mechanical only; no code changes

* chore: remove content_browser_main_loop.patch

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

The function being patched (BrowserMainLoop::MainMessageLoopRun()) no
longer exists.

NB: if removing this introduces regressions the likely fix will be to
add a similar patch for ShellBrowserMainParts::WillRunMainMessageLoop()
which has similar code and was added at the same time this was removed.

* chore: rebuild chromium/put_back_deleted_colors_for_autofill.patch with import-patches -3

Mechanical only; no code changes

* chore: rebuild chromium/disable_color_correct_rendering.patch with import-patches -3

Mechanical only; no code changes

* chore: rebuild chromium/eat_allow_disabling_blink_scheduler_throttling_per_renderview.patch with patch

Mechanical only; no code changes

* chore: rebuild chromium/gpu_notify_when_dxdiag_request_fails.patch with import-patches -3

Mechanical only; no code changes

* chore: rebuild chromium/ui_gtk_public_header.patch manually

no code changes

* chore: rebuild chromium/web_contents.patch with import-patches -3

Mechanical only; no code changes

* chore: remove v8/skip_global_registration_of_shared_arraybuffer_backing_stores.patch

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/2763874

This patch has been merged upstream

* chore: export patches

* chore: update add_trustedauthclient_to_urlloaderfactory.patch

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

Sync with removal of render_frame_id_

* chore: sync chromium/put_back_deleted_colors_for_autofill.patch

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

SkColorFromColorId() no longer takes theme, scheme args

* chore: sync chromium/put_back_deleted_colors_for_autofill.patch

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

Change new calls to GetDarkSchemeColor to fit our patched call signature

* chore: update add_trustedauthclient_to_urlloaderfactory.patch

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

Sync with removal of render_frame_id_ in our mojom

* chore: update chromium/frame_host_manager.patch

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

UrlInfo ctor now takes UrlInfo::OriginIsolationRequest instead of a bool

* chore: update chromium/revert_remove_contentrendererclient_shouldfork.patch

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

Upstream has removed `history_list_length_` which we were comparing to 0
to calculate our `is_initial_navigation` bool when calling ShouldFork().
ShouldFork() is ours and none of the code paths actually use that param,
so this commit removes it altogether.

* chore: update permissions_to_register

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

Replace all uses of APIPermission::ID enum with Mojo type

* refactor: update return type of PreMainMessageLoopRun()

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

Used to return void; now returns an int errorcode.

Note: 2725153 also has some nice doc updates about Browser's "stages"

* refactor: sync ElectronBrowserMainParts to MainParts changes

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

RunMainMessageLoopParts has been replaced with WillRunMainMessageLoop
so `BrowserMainLoop::result_code_` is no longer available to us for our
exit_code_ pointer.

This variable held a dual role: (1) of course, hold the exit code, but
also (2) was a nullptr before the message loop was ready, indicating to
anyone calling SetExitCode() that we were still in startup and could
just exit() without any extra steps. exit_code_ still fulfills these two
roles but is now a base::Optional.

* chore: update ElectronBrowserMainParts::PreDefaultMainMessageLoopRun

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

BrowserMainParts::BrowsePreDefaultMainMesssageLoopRun() has been
removed; move that work to the new WillRunMainMessageLoop().

* refactor: stop using CallbackList; it has been removed.

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

* refactor: update use of threadpools.

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

The upstream code is still in flux (e.g. reverts and re-lands) but the
tl;dr for this commit is (1) include thread_pool.h if you're using it
and (2) don't instantiate pools directly.

* refactor: remove routing_id from CreateLoaderAndStart

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

NB: One logic branch in ProxyingURLLoaderFactory::CreateLoaderAndStart
calls std::make_unique<InProgressRequest>, which needs a routing_id.
This PR uses the member field `routing_id_` since there's no longer one
being passed into CreateLoaderAndStart.

* refactor: sync to upstream ParittionOptions churn

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

PartitionOptions' enums have changed.

* refactor: update Manifest::Location usage

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

tldr: s/Manifest::FOO/ManifestLocation::kFoo/

* chore: bump chromium in DEPS to 91.0.4465.0

* update patches

* refactor: update extensions::Manifest to upstream

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

-  extensions::Manifest::COMPONENT
+  extensions::mojom::ManifestLocation::kExternalComponent

* refactor: sync with upstream UrlInfo ctor changes

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

UrlInfo ctor now takes UrlInfo::OriginIsolationRequest instead of a bool

* chore: update invocation of convert_protocol_to_json.py

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

python3 is being used in parts of the upstream build, but the copy of
convert_protocol_to_json.py invoked in v8/third_party/inspector_protocol
is not python3-friendly. Node has a py2+3-friendly version of it in its
tools directory, so call it instead.

* chore: use extensions::mojom::APIPermissionID

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

tldr:
- extensions::APIPermission::kFoo
+ extensions::mojom::APIPermissionID::kFoo

* chore: Remove support for TLS1.0/1.1 in SSLVersionMin policy

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

Remove TLS v1.0 & 1.1 from our SSLProtocolVersionFromString() function.
This is the same change made upstream at
https://chromium-review.googlesource.com/c/chromium/src/+/2765737/8/chrome/browser/ssl/ssl_config_service_manager_pref.cc

* fixup! chore: update ElectronBrowserMainParts::PreDefaultMainMessageLoopRun

* chore: Use IDType for permission change subscriptions.

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

tldr: {Subscribe,Unsubscribe}PermissionStatusChange's tag type used to
be an int; now it's the new SubscriptionId type (which is an IdType64).

* chore: sync PowerMonitor code to upstream refactor

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

tldr: PowerMonitor has been split into PowerStateObserver,
PowerSuspendObserver, and PowerThermalObserver to reduce number of tasks
posted to consumers who only need notifications for one of those things
instead of all of them.

* chore: use PartitionOptions's new Cookies field

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

* Revert "refactor: remove routing_id from CreateLoaderAndStart"

This reverts commit 8c9773b87a3c84f9073a47089eb2b6889d745245.

8c9773b was only a partial fix; reverting to start & try again.

* update patches

* chore: bump chromium in DEPS to 91.0.4466.0

* chore: update chromium/accelerator.patch

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

tldr: sync patch with upstream renamed variable & macro names.

* chore: update chromium/gtk_visibility.patch

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

tldr: no code changes; just updating the diff to apply cleanly.

note: ooh upstream Wayland hacking!

* chore: update chromium/picture-in-picture.patch

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

tldr: no code changes; just updating the diff to apply cleanly.

* chore: update chromium/worker_feat_add_hook_to_notify_script_ready.patch

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

tldr: no code changes; just updating the diff to apply cleanly.

* chore: export_all_patches

* chore: update chromium/feat_add_set_theme_source_to_allow_apps_to.patch

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

tldr: NotifyObservers has been renamed to NotifyOnNativeThemeUpdated,
so update the invocation in our patch.

* chore: update ElectronBrowserClient w/upstream API

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

tldr: GetDevToolsManagerDelegate() was returning an owned raw pointer.
Replaced it with CreateDevToolsManagerDelegate() which uses unique_ptr<>.

* chore: handle new content::PermissionType::FILE_HANDLING in toV8()

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

`file-handling` string confirmed in https://chromium-review.googlesource.com/c/chromium/src/+/2762201/18/chrome/browser/ui/webui/settings/site_settings_helper.cc

* refactor: remove routing_id from CreateLoaderAndStart pt 1

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

Part 1: the easiest ones

* 2796724: Support Python3

https://chromium-review.googlesource.com/c/infra/luci/python-adb/+/2796724

* chore: bump chromium in DEPS to 91.0.4468.0

* 2668974: WebShare: Implement SharingServicePicker

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

* 2802766: Apply modernize-make-unique to media/

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

* 2802823: Apply modernize-make-unique to gpu/

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

* 2803041: Apply modernize-make-unique to remaining files

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

* 2798873: Convert GtkKeyBindingsHandler build checks to runtime checks

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

* 2733595: [ch-r] Parse ACCEPT_CH H2/3 frame and restart with new headers if needed

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

* chore: update patch indices

* 2795107: Remove unused PermissionRequest IDs.

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

* chore: bump chromium in DEPS to 91.0.4469.0

* chore: fixup patch indices

* chore: bump chromium in DEPS to 91.0.4469.5

* PiP 1.5: Add microphone, camera, and hang up buttons to the PiP window

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

* fixup! refactor: remove routing_id from CreateLoaderAndStart

* refactor: use URLLoaderNetworkServiceObserver for auth requests from SimpleURLLoader

* fixup! chore: fixup patch indices

* 2724817: Expand scope of wasm-eval to all URLs

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

* Fixup patch after rebase

* chore: bump chromium in DEPS to 91.0.4472.0

* 2797341: [ozone/x11] Enabled the global shortcut listener.

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

* 2805553: Reland Add GTK ColorMixers to ColorPipeline P1

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

* 2804366: PiP 1.5: Label back to tab button with origin and center it

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

* 2784730: Fix crash on AX mode change in NativeViewHost without a Widget

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

* chore: update patch indices

* 2810174: Add PdfAnnotationsEnabled policy.

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

* 2807829: Allow capturers to indicate if they want a WakeLock or not.

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

* chore: bump chromium in DEPS to 92.0.4473.0

* chore: bump chromium in DEPS to 92.0.4474.0

* chore: bump chromium in DEPS to 92.0.4475.0

* chore: update patches

* chore: updates patches

* chore: update is_media_key patch to handle new ozone impl

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

* fix: ExecuteJavascript requests now need to be flagged as non-bf-aware

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

* chore: icon_util_x11 is now icon_util_linux

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

* build: update sysroots

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

* build: fix missing symbols on linux build

* use_ozone and use_x11 are not exclusive
* new button view to build for pip

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

* chore: fix broken gtk_util color patch

* chore: remove patch conflict

* build: update linux manifests

* chore: build bttlb on all platforms for pip

* chore: add thread_pool include for views delegate win

* chore: fix lint

* chore: add node patches for V8 changes

* build: add missing base include on windows

* fix: update frame host manager patch for new state transitions

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

* chore: update windows zip manifests

* chore: update mac zip manifests

* chore: fix patch linting

* refactor: implement missing URLLoaderNetworkServiceObserver methods

It is against The Mojo Rules to leave hanging callbacks.  These always
have to be called.

Refs: 186528aab9

* spec: fix locale test on local linux

* fix: pass the exit code correctly in new PreMainMessageLoopRun

Refs: 2622e91c44

* fix: ensure we early-exit when request_handler_ is not provided

Refs: 93077afbfb

* fix: strongly set result_code in the BrowserMainLoop

* fix: invalid usage of non-targetted PostTask

You must always either use a host threadpool or specify a target
thread.  In this case we did neither after this refactor.

Refs: 4e33ee0ad3

* chore: fix gn check

* chore: remove stray .rej files in patch

* chore: add mojo error code to url loader failure

* build: ensure CI is truthy in arm test env

* fix: handle windowCaptureMacV2 being enabled when fetching media source id

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

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-04-15 10:44:35 -07:00
Jeremy Rose f8bdef5349
feat: enable nativeWindowOpen by default (#28552)
* feat: enable nativeWindowOpen by default

* set nativeWindowOpen: false on spec/ main window

* update snapshots

* fix tests

* fix test

* fix webview test missing allowpopups

* fix other test

* update default
2021-04-13 15:36:38 -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 Maddock ef4954fa1f
docs: systemPreferences.subscribeWorkspaceNotification return type (#28588) 2021-04-11 14:02:58 -07:00
Milan Burda da8c35e3b2
chore: remove deprecated worldSafeExecuteJavaScript option (#28456) 2021-04-08 12:03:57 -04:00
Germain 2865d161b7
docs: remove checkbox options in dialog.showMessageBoxSync (#28418) 2021-04-07 00:18:19 -07:00
Shelley Vohr 7d04f729d8
fix: beforeunload and unload firing in BrowserViews (#28382)
* fix: beforeunload and unload firing in BrowserViews

* Ensure UserGesture is sent for BV webContents

* spec: add tests

* refactor: clean up logic

* spec: fixup specs

* docs: document event behavior for BrowserViews
2021-04-07 00:16:10 -07:00
Jeremy Rose 77dcf1020a
fix: pass postData to new-window event (#28513) 2021-04-06 09:54:05 -07:00
Michaela Laurencin 19d7a6b761
fix: enable system maximization for frameless windows except if transparent (#28207)
* fix: move widget maximization check

* fix linting error

* change workaround to only effect transparent windows

* disable menu maximize and restore for transparent windows

* disable double clicking title bar max/unmax for transparent windows

* add docs change and address review
2021-04-06 08:53:59 +09:00
SushiJackal 82ea8ea68c
fix: reject task append to JumpList when description exceeds 260 characters (#28485)
* fix: reject task when description exceeds 260 characters

* Switched out wcslen() for size() [linear -> constant time]

* Included comment describing the need for the additional check

* Added information about character limit to documentation

* Added newline character to end of jump-list-category.md
2021-04-06 08:50:39 +09:00
Michaela Laurencin 2a55ae4b85
docs: add frameName note for window.open (#28435) 2021-03-31 13:57:39 -07:00
Saúl Ibarra Corretgé 2632564ccf
feat: initialize field trials from command line arguments (#28305)
Fixes: #27877
2021-03-26 09:49:00 +09:00
Alexander Prinzhorn 521146f71e
docs: add missing line in web-contents.md (#28376)
* Update web-contents.md

The text block was rendered as part of the `features` property, not the `handler`

* fix linting
2021-03-26 09:46:59 +09:00
Will Anderson 8c3165434a
docs: update Node global symbols example to use contextBridge (#28245)
* docs: update Node global symbols example to use contextBridge

* Trigger Build

* docs: change Node API example to show how to expose a crypto API

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

* docs: Fix lint warning for crypto code sample

* docs: update node API example description to emphasize APIs instead of symbols

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-03-22 11:01:12 +09:00
Jeremy Rose 502d4c19ce
feat: allow omitting submitURL when uploadToServer is false (#28105) 2021-03-18 14:15:19 -07:00
Samuel Attard f35fc93080
chore: rename process.contextIsolation to process.contextIsolated (#28259)
* chore: rename process.contextIsolation to process.contextIsolated

* thing
2021-03-18 14:00:19 -07:00
Milan Burda fc7f2042ec
feat: add process.contextIsolation property (#28030) 2021-03-17 11:23:29 -07:00
Milan Burda 485fa5bea9
feat: add process.contextId used by @electron/remote (#28007) 2021-03-17 11:23:03 -07:00
Samuel Attard b045d42b0e
docs: document the parameter structure of hookWindowMessage (#28189)
Fixes #28178
2021-03-16 17:54:41 +09:00
Gerrit Niezen 45c4dd529f
docs: remove unnecessary enableBlinkFeatures (#28129)
* docs: remove unnecessary enableBlinkFeatures

* docs: remove trailing comma
2021-03-15 10:29:10 +09:00
Binyamin Aron Green a442f11574
fixed typo in docs/api/window-open.md (#28117) 2021-03-13 10:47:33 +09:00
Samuel Attard 74e7f98572
docs: fix cookies event documentation for type generation (#28115) 2021-03-11 12:14:16 -08: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
Shelley Vohr d9997c303f
fix: capturePage not resolving with hidden windows (#27883) 2021-03-09 05:51:44 -08:00
Konstantin Pschera 5b50c88508
docs: auto update downloading multiple times (#27888) 2021-03-08 10:03:34 +09:00