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

248 Коммитов

Автор SHA1 Сообщение Дата
Shelley Vohr 17ccb3c6ec
refactor: leverage Skia helpers for NSColor ANSI logic (#37452) 2023-03-03 09:42:50 +01:00
Jeremy Rose e27905c765
fix: allow contextmenu event in draggable regions (#37386) 2023-02-23 16:05:30 -08:00
Cheng Zhao 0de1012280
feat: add BrowserWindow.set/getWindowButtonPosition APIs (#37094) 2023-02-17 19:06:32 +09:00
Jeremy Rose 71944f2c3b
refactor: simplify events (#37099) 2023-02-13 13:39:18 -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
Milan Burda eb291485bb
chore: drop support for Windows 7 / 8 / 8.1 (#36427)
* chore: drop support for Windows 7 & 8

* chore: remove disable-redraw-lock.patch

* chore: update patches

* Update docs/breaking-changes.md

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

* Update docs/breaking-changes.md

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>

* fix breaking-changes.md

* chore: note last supported version

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

* chore: add link to deprecation policy

* Update docs/breaking-changes.md

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

* update README.md

Co-authored-by: Milan Burda <miburda@microsoft.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2022-11-30 17:13:29 -08:00
Robo 2c723d7e84
fix: enable crashpad for ELECTRON_RUN_AS_NODE processes (#36460)
* wip: enable crashpad for node processes

fix: add PID testing method

wip: plumb fd into child_process in node

* node::ProcessInitializationFlags::kNoDefaultSignalHandling

* chore: clean up debug logging

* chore: gate platform includes

* test: clean up node process test

* fix: pass pid in node_main

* chore: cleanup impl

* chore: fixup patch method definition

* fix: expose bound methods to node_main

* fix: remove bound methods

* fix: crashpad connection for all ELECTRON_RUN_AS_NODE processes

* chore: fix typo

* chore: address review feedback

* chore: delay crashpad initialization

* chore: ensure options.env, code hygiene

* chore: add argv test, check for process.env over {}

* fix: fix test, return options.env immutability

Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
2022-11-29 10:33:54 -05: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
electron-roller[bot] 87c183df6a
chore: bump chromium to 110.0.5415.0 (main) (#36186)
* chore: bump chromium in DEPS to 109.0.5386.0

* chore: bump chromium in DEPS to 109.0.5388.0

* chore: bump chromium in DEPS to 109.0.5390.0

* chore: bump chromium in DEPS to 109.0.5392.0

* chore: bump chromium in DEPS to 109.0.5394.0

* chore: bump chromium in DEPS to 109.0.5396.0

* chore: bump chromium in DEPS to 109.0.5398.0

* chore: bump chromium in DEPS to 109.0.5400.0

* chore: update galactus

* chore: bump chromium in DEPS to 109.0.5402.0

* chore: bump chromium in DEPS to 109.0.5403.0

* chore: bump chromium in DEPS to 109.0.5406.0

* chore: update patches

* 4004247: Delete unused DocumentWebContentsDelegate

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

* chore: bump chromium in DEPS to 109.0.5408.1

* chore: update patches

* 3949284: Support pkey debug mode without pkey 0 access

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

* chore: bump chromium in DEPS to 109.0.5410.0

* chore: update patches

* 4000944: [Extensions] Create an API directory in //chrome/renderer/extensions

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

* 3988524: Remove DocumentOverlayWindowViews | https://chromium-review.googlesource.com/c/chromium/src/+/3988524

Co-authored-by: George Xu <33054982+georgexu99@users.noreply.github.com>

* chore: bump chromium in DEPS to 109.0.5412.0

* chore: update patches

* 3984022: Add AddChildWindowToBrowser to DisplayClient mojo interface

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

* 3957079: Delete the CryptoToken component extension and internal API

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

* 4004421: Migreate ScopedAllowIO to ScopedAllowBlocking

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

Co-authored-by: George Xu <georgexu99@users.noreply.github.com>

* chore: bump chromium in DEPS to 109.0.5414.0

* chore: update patches

* 4016180: Split PPAPI Mojo interfaces out of RenderFrameHostImpl.

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

* 3970838: [MPArch] Convert HostZoomMap and ZoomController off of RenderViewHost ids

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

* 3997795: Don't add Chromium as a login item

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

* 3993482: Remove RefCountedString::TakeString

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

* 3990749: Allow forward-declared sources in base::ScopedObservation<>

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

* fixup! 3957079: Delete the CryptoToken component extension and internal API

* chore: bump chromium in DEPS to 110.0.5415.0

* 3883790: Move devtools_frame_token to the RenderFrameHost, to preserve RFH identity across MPArch activations.

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

* 4022205: Move license tooling into //tools/licenses

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

* chore: fixup patch indices

* fixup! 3957079: Delete the CryptoToken component extension and internal API

* 4008687: Finish ScopedAllowIO migration

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

* 3991548: Move WindowButtonOrderObserver and WindowFrameAction to LinuxUi

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

* fixup! 3984022: Add AddChildWindowToBrowser to DisplayClient mojo interface

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

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

* 4000481: Rename :chromedriver to :chromedriver_server

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

* 4008687: Finish ScopedAllowIO migration

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

* 3988524: Remove DocumentOverlayWindowViews

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

* fixup! 3997795: Don't add Chromium as a login item

* chore: fixup patches

* 3996872: Plumb input event task runner to EventFactoryEvdev

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

* 4014994: Enable SiteIsolationForGuests by default.

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

* chore: adopt new thread restrictions api for //electron (#36357)

chore: add thread blocking api

* fixup! 4014994: Enable SiteIsolationForGuests by default.

* pull parent HWND for dialogs on ui thread

* chore: set parent_window in MessageBoxSettings

* chore: remove redundant patch

* chore: revert accidental deletion

* chore: update patches

Co-authored-by: electron-roller[bot] <84116207+electron-roller[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 <vertedinde@electronjs.org>
Co-authored-by: George Xu <33054982+georgexu99@users.noreply.github.com>
Co-authored-by: George Xu <georgexu99@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-11-17 14:59:23 -05:00
Jeremy Rose 184ac2b382
refactor: move draggable regions to WebContents (#36230) 2022-11-07 10:15:57 -08:00
Milan Burda 2f2c43e5e5
build: fix building with enable_plugins = false (#36193)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2022-10-31 16:18:15 -07: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
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
Daniel Kocielinski 23d4a252c6
chore: Move draggable regions implementation from NativeBrowserView into InspectableWebContentsView (#35007)
* hore: Move draggable regions implementation from NativeBrowserView into InspectableWebContentsView

The draggable regions implementation is related to WebView, so
InspectableWebContentsView is a more appropriate place to put it there.
Also, this refactoring will allow the subsequent extension of the
WebContentsView API, which will eventually replace BrowserView API.

* fix: Lint error

* fix: Adjusted owner-window
2022-10-17 11:10:07 -04:00
Jeremy Rose 8a926ffde4
refactor: use views NonClientHitTest for draggable regions on mac (#35603)
* refactor: use views NonClientHitTest for draggable regions on mac

* iwyu

* add backport of 9bb5f0316

* chore: update patches

* remove some unneeded functions

* remove test for triggering when BW is focused

* chore: update patches

* simplify views/mac split now that the draggable logic is the same

* Apply suggestions from code review

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

* Update shell/browser/native_window.h

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

* fix build

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-10-12 12:05:45 -04:00
matthewloft 4935fd2422
fix: WebAuthn Discoverable Credential (Resident Credential) (#35374)
* fix: WebAuthn Discoverable Credential (Resident Credential) #33353

Enables support for Webauthn discoverable credentials (aka resident
credentials). This allows users to authenticate without first having to
select or type a username.

To decide if discoverable credentials are supported, the class
'AuthenticatorCommon', in the chrome content code, indirectly calls the
method 'context::WebAuthenticationDelegate.SupportsResidentKeys(..)'.
The default implementation of this returns false, leaving it up to
specific implementations to override.

This change adds a new class 'ElectronWebAuthenticationDelegate' to
subclass 'WebAuthenticationDelegate' and override the behaviour of the
'SupportsResidentKeys' method to return true.
The implementation is copied from the Chrome browser equivalent
'ChromeWebAuthenticationDelegate', though the chrome class includes
other methods that don't seem to be required for this functionality.

The 'ElectronContentClient' class was also updated to store an instance
of 'ElectronWebAuthenticationDelegate', and to provide an accessor
method, GetWebAuthenticationDelegate().

* Remove redundant, commented-out code

* style: comment cleanup

* style: updated comments and formatting based on pull request review

* style: fix lint error on header guard clause
2022-09-20 15:47:42 -07:00
electron-roller[bot] b0036ea43a
chore: bump chromium to 107.0.5286.0 (main) (#35590)
* chore: bump chromium in DEPS to 107.0.5286.0

* 3866335: media: Rename KeySystemProperties to KeySystemInfo - file renaming

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

* 3864686: [PA] Introduce *Scan buildflag

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

* chore: fixup patch indices

* 3849359: Remove unused PrefValueStore::Delegate

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

* 3873005: [CodeHealth] Modernising extensions Tab utils

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

* 3846595: Auto-select PipeWire target once selection is made

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

* 3826169: [json-schema-compiler] Support abs::optional<bool>

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

* fixup! Remove unused PrefValueStore::Delegate

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: deepak1556 <hop2deep@gmail.com>
2022-09-08 16:23:08 -07:00
Jeremy Rose a0dbae72c8
chore: remove UnresponsiveSuppressor altogether (#35507)
* chore: drop unresponsive suppressor for menu_mac

* also for views

* header

* chore: remove UnresponsiveSuppressor altogether
2022-09-08 15:49:33 -07:00
Shelley Vohr 70d6cbfb44
chore: remove unused `GuestViewContainer` (#35405)
chore: remove unused GuestViewContainer
2022-08-25 15:56:47 +09:00
Jeremy Rose 221bb51326
feat: session.setDisplayMediaRequestHandler (#30702) 2022-08-22 14:15:32 -07:00
Valentin Hăloiu 67eda4bcc8
fix: add support for --ozone-platform-hint flag on Linux (#34937) 2022-07-21 10:37:54 +02:00
Jeremy Rose 3c7d446fad
refactor: unduplicate MediaStreamDevicesController (#34895)
* refactor: unduplicate MediaStreamDevicesController

* restore old logic for GUM_* request types

* lint

* gn format

* add test for unsupported getDisplayMedia

* simplify + comment
2022-07-20 17:09:14 +09:00
Joan Xie afd08c9450
feat: Enable APNS registration + notification delivery in macOS apps (#33574) 2022-07-12 08:38:49 -07:00
Shelley Vohr 95019f0454
fix: update Windows caption buttons to match Win11 style (#34790) 2022-07-12 09:13:40 +02:00
Jeremy Rose 0ee7f14190
chore: modernize Value usage in converters (#34794)
* chore: modernize Value usage in converters

* Date is parsed as an empty object now
2022-07-05 11:25:18 -04:00
Michaela Laurencin 4c7c0b41c2
feat: add immersive dark mode on windows (#33624)
* feat: add immersive dark mode

* fix syntax and add header

* add me

* Update fuses.json5

* fix: redraw title bar on dark mode change

* chore: SetWindowTheme doesn't seem to be needed

* chore: separate out Win 10 dark mode implementation

* final touches

* final touches

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

* fix types

* fix lint

Co-authored-by: Micha Hanselmann <micha.hanselmann@gmail.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2022-06-14 12:27:28 -04:00
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
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
Marek Rusinowski cdf2b3f4e4
fix: calling of X11 functions when running under Wayland (#33355)
* fix: don't call X11 functions in file dialog and message box

* refactor: remove unused GtkUiPlatform declaration

* fix: set gtk darktheme only when running under X11

* fix: replace X11 window state watcher with implementation using ozone

* fix: make sure global menu barr is used only when supported

* fix: don't call X11 function in native window views under wayland

* style: fix lint issues

* fix: use GtkUiPlatform::ShowGtkWindow instead of gtk_window_present directly

* refactor: extract CreateGlobalMenuBar into separate function

* refactor: move checking for WaylandWindowDecorations inside class

* fix: check if we run under X11 only in ozone build

* refactor: drop including unused ui/base/ui_base_features.h header

* fix: modify ui_gtk_public_header.patch to also export gtk_ui.h

* fix: refactor guarding of X11 calls

- Introduce patch exposing new electron_can_call_x11 property
- Replace defined(USE_OZONE) with BUILDFLAG(OZONE_PLATFORM_X11) flags

* fix: remove the last remaining usage of USE_X11

* fix: usage of BUILDFLAG(OZONE_PLATFORM_X11) not building on non ozone

* fix: call UpdateWindowState from OnBoundsChanged only under X11
2022-03-28 12:48:50 -04:00
Samuel Attard e07c2b84d7
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33323)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames

Notes: no-notes

* refactor: extract electron API IPC to its own mojo interface

* fix: just check main frame not primary main frame
2022-03-18 19:50:05 -07:00
electron-roller[bot] 28ada6ea8b
chore: bump chromium to 100.0.4857.0 (main) (#32419)
* chore: bump chromium in DEPS to 99.0.4819.0

* chore: update patches

* chore: bump chromium in DEPS to 99.0.4824.0

* chore: update patches

* chore: bump chromium in DEPS to 99.0.4827.0

* chore: update patches

* 3352511: PiP: Add inkdrop and pointer cursor to PiP window buttons

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

* 3309164: webhid: Show FIDO devices in the chooser if allowed

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

* 3297868: hid: Add experimental HIDDevice.forget()

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

* 3362491: [Extensions] Move i18n API to //extensions

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

* MCC Refactor step0: Allow embedders to register associated_interface binders with RenderFrameHostImpl::associated_registry_.

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

* 3352616: [Gtk] Remove libgtk from the link-line

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

* 3249211: Clear-Site-Data support for partitioned cookies

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

* [Extensions][COIL] Use [allow|block]list in //extensions/common

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

* Begin ScopedUserPrefUpdate migration to modern base::Value

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

* [Code Health] Refactor PrefService GetDict + GetList to use base::Value

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

* 3354997: [CodeHealth] Remove deprecated SetDictionary method

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

* 3287323: Add LacrosPrefStore for lacros settings

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

* 3365916: [PA] Clean up remaining lazy commit code

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

* [MPArch] Target the external protocol error at the responsible frame.

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

* Pass origin to RegisterNonNetworkSubresourceURLLoaderFactories

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

* Linux: Send OSCrypt raw encryption key to the Network Service

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

* [PlzServiceWorker] Remove remaining references to PlzServiceWorker.

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

* chore: fixup for lint

* 3327621: Fix tablet mode detection for Win 11.

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

* 3342428: ax_mac: move AXTextMarker conversion utils under ui umbrella

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

* 3353974: Mac: Use base::Feature for overlay features

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

* chore: bump chromium in DEPS to 99.0.4828.0

* chore: update patches

* chore: bump chromium in DEPS to 99.0.4837.0

* chore: update patches

* chore: update patches

* 3379142: Drop FALLTHROUGH macro
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3379142

* 3381749: C++17: Allow use of std::map::try_emplace and std::map::insert_or_assign
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3381749

* chore: bump chromium in DEPS to 99.0.4839.0

* chore: update patches

* chore: bump chromium in DEPS to 99.0.4840.0

* chore: bump chromium in DEPS to 99.0.4844.0

* 3395881: [api] Deprecate Local<v8::Context> v8::Object::CreationContext()

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

* chore: update patches

* chore: bump chromium in DEPS to 100.0.4845.0

* chore: update patches

* chore: bump chromium in DEPS to 100.0.4847.0

* chore: update patches

* chore: bump chromium in DEPS to 100.0.4849.0

* chore: update patches

* chore: bump chromium in DEPS to 100.0.4851.0

* chore: bump chromium in DEPS to 100.0.4853.0

* update patches

* chore: update patches

* update patches

* 3383599: Fonts Access: Remove prototype that uses a font picker.

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

* 3404768: Remove ALLOW_UNUSED macros

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

* 3374762: Remove ignore_result.h

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

* 3399305: [unseasoned-pdf] Apply proper frame offsets for touch selections

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

* 3402210: [Extensions] Don't trigger unload event for already unloaded extension

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

* 3410912: Combine URLLoaderClient OnReceiveResponse and OnStartLoadingResponseBody.

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

* 3370428: Make the AuthSchemes policy support dynamic refresh

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

* 3407603: Finish ScopedUserPrefUpdate migration to modern base::Value

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

* 3378352: ozone/x11: move code from //ui/p/x11 to //ui/ozone/p/x11

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

* 3370810: Delete chrome/service, AKA the Cloud Print service process.

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

* chore: bump chromium in DEPS to 100.0.4855.0

* chore: update patches

* fixup! 3370810: Delete chrome/service, AKA the Cloud Print service process.

* revert 3348007 to fix windows build

* 3318572: [Code health] Fix gn check errors in //extensions/browser:*

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

* fix printing.patch

* fix iwyu issue

* 3408515: win: Make ShorcutOperation an enum class and modernize names

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

* 3388333: [UIA] Remove dead code accessibility_misc_utils.h/cc

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

* fix windows build? i hope

* patch gn visibility of //ui/ozone/platform/x11

* missing include base/logging.h

* use BUILDFLAG for USE_NSS_CERTS

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

* defined(OS_*) ==> BUILDFLAG(IS_*)

https://bugs.chromium.org/p/chromium/issues/detail?id=1234043

* fixup! 3404768: Remove ALLOW_UNUSED macros

* another attempt to fix windows build

* temporarily disable the custom scheme service worker test

https://github.com/electron/electron/issues/32664

* fix loading mv3 extensions

not sure what cl broke this unfort.

* fixup! 3404768: Remove ALLOW_UNUSED macros

* patch nan

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

* fix node test

* fix nullptr in FindPdfFrame

* patch perfetto to fix build issue on win-ia32

bc44c3c753

* fix build for linux-x64-testing-no-run-as-node

* fix patch

* skip <webview>.capturePage() test

https://github.com/electron/electron/issues/32705

* test: fix failing tests of focus/blur events of WebContents (#32711)

* inherit stdio from app module test child processes

this prevents them from timing out due to full stdout buffers

* test to see if we can get better logs on windows ci

* try again for appveyor log things

* skip contentTracing tests on ia32

* ci: disable gpu compositing

* drop applied patch

* fix merge fail

* Revert "ci: disable gpu compositing"

This reverts commit 0344129fcb.

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: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: VerteDinde <khammond@slack-corp.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2022-02-09 18:58:52 -08:00
Ryan Gonzalez 7caa88c46f
fix: Add support for Wayland window decorations (#29618)
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2022-01-26 13:59:09 -08:00
Jeremy Rose 6e6f5efad9
fix: re-enable PartitionAlloc on macOS (#32442)
* fix: re-enable PartitionAlloc on macOS

* no need to copy ignore_result on linux

* factor out FixStdioStreams

* include buildflags.h in electron_main_linux

* #include electron/fuses

* more missing includes
2022-01-17 16:46:33 +09:00
Milan Burda 97eb424450
refactor: move certificate_manager_model to shell (#31631) 2021-11-08 09:53:00 +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
Shelley Vohr c8e4cc29c0
fix: prevent navigator.fonts.query() from crashing (#30930)
* fix: prevent navigator.fonts.query() from crashing

* refactor: use base::PostTask instead
2021-09-15 09:56:38 -04:00
Shelley Vohr 00d0265782
refactor: reuse upstream //shell_dialogs (#30663) 2021-09-14 12:16:34 +02:00
Samuel Attard 57d088517c
feat: add support for validating asar archives on macOS (#30667)
* feat: add support for validating asar archives on macOS

* chore: fix lint

* chore: update as per feedback

* feat: switch implementation to asar integrity hash checks

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

* chore: fix lint

* chore: fix missing log include on non-darwin

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

* fix: match ValidateOrDie symbol on non-darwin

* chore: fix up asar specs by repacking archives

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

* debug test

* Update node-spec.ts

* fix: initialize header_validated_

* chore: update PR per feedback

* chore: update per feedback

* build: use final asar module

* Update fuses.json5
2021-09-09 14:49:01 -07:00
Milan Burda 94ca57e296
chore: move global_menu_bar_registrar_x11 out of chromium_src (#30837) 2021-09-06 09:03:07 +02:00
Raymond Zhao e6f781f403
refactor: Convert ProcessSingleton changes to patch (#30594)
* Convert ProcessSingleton changes to patch

* Update patch

* Polish

* Add sandbox check to patch

* Add missing includes

* Fix linking error

* Fix compile error

* Apply PR feedback

* Fix compile fails

* Fix tests

* Remove extra patch

* Update test
2021-09-03 14:16:33 -07:00
Samuel Attard 8007d01874
feat: add support for the U2F Web API (#30438)
* feat: add support for the U2F Web API

* chore: fix lint

* chore: fix tests

* build: disable src caching

* Revert "build: disable src caching"

This reverts commit c4c8a60fc435a10788475ec171399a55ac2dd674.

* chore: update per feedback

* chore: consistent code removal
2021-08-30 11:22:46 -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
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
Cheng Zhao 97929eab5f
fix: move window buttons in-place on macOS (#30322) 2021-08-04 09:31:12 +09: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
Robo 6bd13cc98f
fix: load source maps from custom protocols and asar bundles (#28573)
* fix: load source maps from custom protocols and asar bundles

* chore: fix lint
2021-04-11 21:59:36 -07:00
John Kleinschmidt d57fd6cef0
fix: navigator.bluetooth.requestDevice (#27902)
* fix: navigator.bluetooth.requestDevice

* cleanup lint and add test

* update bluetooth test to handle no bluetooth adapter available

* update bluetooth test to handle bluetooth permission denied
2021-02-26 11:10:27 -08:00
Cheng Zhao 8bf66f8974
fix: clean up implementations of titleBarStyle (#27489)
* Rewrite titleBarStyle impls with WindowButtonsView

* Remove fullscreenWindowTitle option

* Make buttons show correctly under RTL

* Fix docs about traffic lights position

* Fix test on fullscreen resizable

* Fix button states with closabe/minimizable/fullscreenable

* Fix typo

* Deprecate the fullscreenWindowTitle option
2021-01-30 17:15:10 -06:00
John Kleinschmidt c5a41defbd
fix: enable navigator.setAppBadge/clearAppBadge (#27067) 2021-01-21 14:45:06 +09:00