Commit graph

1132 commits

Author SHA1 Message Date
trop[bot]
c24f330b45
refactor: add EmitDeprecationWarning helper (#46879)
* refactor: add EmitDeprecationWarning helper

Also switches EmitWarning to using Node's ProcessEmitWarningGeneric

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

* chore: use node namespace for function call

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-01 09:44:59 -05:00
trop[bot]
3981c173ef
refactor: remove public method BrowserWindow::GetWeakPtr() (#46796)
refactor: remove public method electron::api::BrowserWindow::GetWeakPtr()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-25 20:09:44 -05:00
trop[bot]
c4302ab58c
fix: crash when renderer process crashes while webview is reloading (#46768)
WebView uses WebContentsViewChildFrame, which doesn't have a Focus impl
and triggers a fatal NOTREACHED.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Jinli Wu <wujinli@bytedance.com>
2025-04-25 18:01:41 +02:00
trop[bot]
08a4c333a3
fix: missing HandleScope in RemoveFromParentChildWindows (#46773)
fix: missing HandleScope in RemoveFromParentChildWindows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-04-25 11:30:19 -04:00
trop[bot]
5a4ef1cc33
refactor: make node Buffers more friendly to base::span / std::span (#46778)
* refactor: add electron::Buffer namespace; move the Buffer as_byte_span() into it

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

* feat: add electron::Buffer::Copy()

a span-friendly version of node::Buffer::Copy()

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

* refactor: use electron::Buffer::Copy() in electron_api_base_window.cc

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

* refactor: use electron::Buffer::Copy() in electron_api_data_pipe_holder.cc

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

* refactor: use electron::Buffer::Copy() in electron_api_safe_storage.cc

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

* refactor: use electron::Buffer::Copy() in electron_api_clipboard.cc

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

* refactor: use electron::Buffer::Copy() in osr_converter.cc

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

* refactor: use electron::Buffer::Copy() in electron_api_native_image.cc

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

* refactor: use electron::Buffer::Copy() in net_converter.cc

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

* refactor: use electron::Buffer::Copy() in electron_api_web_contents.cc

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

* refactor: make NewEmptyBuffer() return a Local<Value>

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-25 10:24:43 -05:00
trop[bot]
fc319e0ea3
fix: explicitly call GetNativeNSView() on macOS (#46750)
* fix: explicitly call GetNativeNSView() on macOS

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

* chore: move macOS impl to a .mm file

This is needed in order to access gfx::NativeView::GetNativeNSView()

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-24 09:53:53 -05:00
trop[bot]
07a7ebb714
refactor: make electron::api::BaseWindow fields private (#46710)
refactor: make electron::api::BaseWindow fields private

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-22 12:33:01 -05:00
trop[bot]
301f7b4e64
fix: postMessage crash with invalid transferrable (#46667)
* fix: postMessage crash with invalid transferrable

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: address review feedback

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

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-04-17 18:23:23 +02:00
trop[bot]
7b66361ca8
feat: expose nativeTheme.shouldUseDarkColorsForSystemIntegratedUI (#46598)
feat: expose shouldUseDarkColorsForSystemIntegratedUI

Closes https://github.com/electron/electron/issues/46429.
Refs https://github.com/electron/electron/pull/19735.

This PR adds a new API `shouldUseDarkColorsForSystemIntegratedUI` to the
`nativeTheme` module. This API returns a boolean indicating whether the
system is using dark colors for system integrated UI elements. This is
useful for applications that want to adapt their UI to match the system
theme, especially for those that use system integrated UI elements like
the shell theme or taskbar appearance.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-04-16 19:40:55 +02:00
trop[bot]
339e0040ef
fix: paint and flash issues on macOS (#46629) 2025-04-15 12:56:20 +02:00
trop[bot]
53633fcaeb
fix: fallback to old MacOS context menu behavior if no frame is present (#46619)
* fix: fallback to old MacOS context menu behavior if no frame is present

Co-authored-by: georgexu99 <georgexu99@electronjs.org>
Co-authored-by: erickzhao <erickzhao@electronjs.org>
Co-authored-by: clavin <calvin@electronjs.org>

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* docs: add additional option for focusedFrame

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fix: handle frame found, but no view update from rfh

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fix: fix conditional

Co-authored-by: Calvin <clavin@users.noreply.github.com>

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2025-04-14 11:24:01 +02:00
trop[bot]
285d347b51
refactor: use default printing path when no user options (#46617)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-04-12 18:50:06 -05:00
trop[bot]
28eb0e6f3d
fix: crash on parent window close and focur/blur (#46580)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-04-09 11:19:20 -05:00
trop[bot]
3fdcd38b8b
refactor: simplify some BaseWindow JS getters (#46565)
* refactor: return a std::array<int 2> from BaseWindow::GetMaximumSize()

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

* refactor: return a std::array<int 2> from BaseWindow::GetMinimumSize()

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

* refactor: return a std::array<int 2> from BaseWindow::GetPosition()

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

* refactor: return a std::array<int 2> from BaseWindow::GetSize()

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

* refactor: return a std::array<int 2> from BaseWindow::GetContentSize()

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

* refactor: extract helper method ToArray(const gfx::Size)

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

* refactor: #include correctness

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-08 13:44:15 -05:00
trop[bot]
feaa9ec5b9
refactor: make api::View methods const, private (#46551)
* refactor: make api::View::GetBounds() const

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

* refactor: make api::View::OnViewBoundsChanged() private

refactor: make api::View::OnViewIsDeleting() private

refactor: make api::View::OnChildViewRemoved() private

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

* refactor: make ChildPair private

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-08 08:53:17 -05:00
electron-roller[bot]
2dd4b77ae0
chore: bump chromium to 136.0.7095.0 (36-x-y) (#46184)
* chore: bump chromium in DEPS to 136.0.7081.1

* chore: bump chromium in DEPS to 136.0.7083.1

* chore: bump chromium in DEPS to 136.0.7085.1

* chore: bump chromium in DEPS to 136.0.7087.1

* chore: bump chromium in DEPS to 136.0.7089.0

* chore: bump chromium in DEPS to 136.0.7091.0

* chore: bump chromium in DEPS to 136.0.7092.0

* chore: bump chromium in DEPS to 136.0.7093.1

* chore: bump chromium in DEPS to 136.0.7095.1

* chore: bump chromium in DEPS to 136.0.7097.1

* chore: bump chromium in DEPS to 136.0.7099.1

* chore: bump chromium in DEPS to 136.0.7101.0

* chore: bump chromium in DEPS to 136.0.7103.0

* chore: bump chromium in DEPS to 136.0.7103.15

* chore: bump chromium in DEPS to 136.0.7103.17

* chore: bump chromium to 136.0.7095.0 (main) (#46118)

* chore: bump chromium in DEPS to 136.0.7076.0

* chore: bump chromium in DEPS to 136.0.7077.0

* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | 6368856

* 6356528: Clean up LegacyRenderWidgetHostHWND code | 6356528

* chore: export patches

* 6339113: [Viewport Segments] Add CDP commands to override Viewport Segments without overriding other device properties. | 6339113

* 6352169: [DevTools][MultiInstance] Support new tab in another window on Android | 6352169

* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | 6368856

* 6360858:Clickiness: Wire response from URLLoader to DB, add e2e tests| 6360858

* chore: bump chromium in DEPS to 136.0.7079.0

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7081.0

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7083.0

* 6361987: Remove double-declaration with gfx::NativeView and gfx::NativeWindow | 6361987

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7087.0

* chore: export patches

* fix: include node patch for missing AtomicsWaitEvent
6385540

* build: add depot_tools python to path

* fix: cppgc init and unregistering v8 isolate

6333562

CppGc is now initialized earlier so Node can skip reinitializing it.

Additionally, gin::IsolateHandle was attempting to destruct an already destructed
v8::Isolate upon electron::JavaScriptEnvironment destruction. By removing the call
to NodePlatform::UnregisterIsolate, this fixes the crash on app shutdown.

* fix: unregister isolate after destruction

See code comment.

* chore: bump chromium in DEPS to 136.0.7095.0

* chore: sync patches

* fix: add script_parsing::ContentScriptType parameter
6298395

* fix: migrate content::BrowserAccessibilityState methods
6401437
6383275

* feat: enableHappyEyeballs option for host resolver
6332599

* fix: add new cookie exclusion reason
6343479

* fix: add new url loader method
6337340

* fix: add new cppgc header file for electron_node headers
6348644

* fix: disable CREL on Linux ARM64
https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9

* fixup! fix: add new cppgc header file for electron_node headers 6348644

* chore: update corner smoothing patch

* fixup! chore: update corner smoothing patch

* chore: disable NAN weak tests

These two tests are incompatible with a V8 change that disallows running JS code from a weak finalizer callback.

Ref: 4733273

* test: fix task starvation in node test

A V8 change makes these contexts get collected in a task that is posted
and run asynchronously. The tests were synchronously GC'ing in an
infinite loop, preventing the task loop from running the task that would
GC these contexts.

This change should be upstreamed in some way.

Ref: 4733273

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: clavin <clavin@electronjs.org>
(cherry picked from commit 9c019b6147)

* Remove file-wide unsafe buffer suppression from content/ [3 of N]

6341711

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-04-07 13:09:35 -05:00
trop[bot]
64c9afcf77
refactor: use base::flat_set in WebContents::DidUpdateFaviconUrl() (#46530)
* refactor: add gin::Converter<std::span>::ToV8()

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

* feat: add ToV8(const base::flat_set<T>&)

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

* perf: use a flat_set in WebContents::TitleWasSet()

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

* refactor: add gin::Converter<std::array>::ToV8()

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-07 10:16:56 -05:00
trop[bot]
31e3c84843
refactor: instantiate navigation_entries local variable on the stack (#46504)
* refactor: instantiate navigation_entries on the stack instead of the heap

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

* refactor: reserve the full size of navigation_entries

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

* refactor: use emplace_back to simplify the code a little

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-05 10:45:02 -05:00
trop[bot]
42514326ca
refactor: remove unused electron::api::App::FileIconCallback (#46510)
refactor: remove electron::api::App::FileIconCallback

last use removed in 2018 by 3f15f516

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-05 10:44:18 -05:00
trop[bot]
99c3728a93
perf: avoid redundant call to virtual methods GetProcess() and GetID() (#46445)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-03 20:35:12 -05:00
trop[bot]
8fec7adfa6
fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8 (#46471)
* fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8

Co-authored-by: Yang Liu <ouyangliu.leo@gmail.com>

* fix: use CleanedUpAtExit to control the lifetime of GPUInfoManager

Co-authored-by: Yang Liu <ouyangliu.leo@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Yang Liu <ouyangliu.leo@gmail.com>
2025-04-03 18:05:13 -05:00
trop[bot]
6126cc2bfe
fix: UtilityProcess.fork crash before app ready (#46404)
fix: UtilityProcess.fork crash before app ready

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-04-01 09:32:43 -05:00
trop[bot]
e2b9cedf0f
feat: add support for associating a Menu with a WebFrameMain (#46350)
feat: add support for associating a Menu with a WebFrameMain (#45138)

* feat: add support for associating a Menu with a WebFrameMain

This allows certain OS level features to activate such as Writing Tools, Autofill.. and Services.

There appears to be a bug in macOS where the responder chain isn't traversed if the menu is not popped up using an event, as such we spoof a fake mouse event at the write coordinates in the right window and use that to open the menu.

* build: fix build on non-mac

* build: oops missed a header

* fix: safely handle optional T* by checking nullptr too

* build: fix gn check and build errors

* docs: suggested changes

* feat: default `frame` to `window.webContents.mainFrame` when possible

* fix: avoid deref nullptr view

* Revert "feat: default `frame` to `window.webContents.mainFrame` when possible"

This reverts commit 2e888368199317d67f6ad931a7e9eff0295c4b1b.

* fix: lint

* Remove redundant scoped objects

This code, including the comments, matches almost exactly the behavior of this argument to the function.

* Add ScopedPumpMessagesInPrivateModes patch

* More null pointer safety

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
2025-04-01 09:00:46 -05:00
trop[bot]
6b1d1bf893
perf: prefer absl::flat_hash_set over std::unordered_set (#46375)
* perf: use absl::flat_hash_set in SpellCheckClient::SpellCheckText()

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

* perf: use absl::flat_hash_set in MessagePort::DisentanglePorts()

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-31 09:14:51 -05:00
trop[bot]
7e80e8f610
refactor: use v8::String::Empty() when creating empty strings (#46371)
refactor: use v8::String::Empty() when creating empty strings

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-31 10:39:48 +02:00
trop[bot]
11c35626da
perf: avoid redundant map lookups in GetStorageMask() (#46346)
* perf: avoid a redundant map lookuop in GetStorageMask()

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

* perf: avoid a redundant map lookup in GetDataTypeMask()

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-28 12:27:28 -05:00
trop[bot]
c89bebdee1
perf: avoid double map lookup in WebFrameMain::UpdateRenderFrameHost() (#46331)
perf: avoid double map lookup in WebFrameMain::UpdateRenderFrameHost()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-27 18:13:39 -05:00
trop[bot]
71f17fcf5b
fix: set userAgent on navigationHistory.restore() (#46299)
fix: set userAgent on navigationHistory restore

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-03-26 19:53:12 -05:00
trop[bot]
dde045db9c
perf: avoid std::map temporaries in WebContents::DevToolsRequestFileSystems() (#46309)
* perf: move the GetDevToolsWebContents() call outside of the loop

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

* perf: remove std::map temporary in WebContents::DevToolsRequestFileSystems()

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

* refactor: remove unused GetAddedFileSystemPaths()

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

* perf: remove std::vector temporary in WebContents::DevToolsRequestFileSystems()

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-26 19:25:49 -05:00
trop[bot]
3ff5c4ea5f
perf: avoid redundant map lookup in WebContents::DevToolsIndexPath() (#46295)
perf: avoid double map lookup in WebContents::DevToolsIndexPath()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-26 18:34:37 -05:00
trop[bot]
32c352bff5
fix: build failure when printing is disabled (#46284)
fix: ftbfs when printing is disabled

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-26 12:48:49 +01:00
trop[bot]
3e2aa2f443
perf: avoid redundant map lookup in WebFrameMain constructor (#46276)
perf: avoid double map lookup in WebFrameMain constructor

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-25 22:01:02 -04:00
trop[bot]
5b9f71602d
fix: webContents.printToPDF() with cross-process subframes (#46259)
fix: webContents.printToPDF() with cross-process subframes

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-03-25 14:11:28 -05:00
trop[bot]
bb882b4f3d
perf: avoid std::map temporaries in IsDevToolsFileSystemAdded() (#46267)
* refactor: extract-method GetAddedFileSystems()

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

* refactor: use GetAddedFileSystems() in GetAddedFileSystemPaths()

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

* refactor: use GetAddedFileSystems() in IsDevToolsFileSystemAdded()

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-25 14:10:12 -05:00
trop[bot]
9efacb6147
perf: avoid redundant map lookups in GlobalShortcut (#46261)
* perf: avoid redundant map lookup in GlobalShortcut::OnKeyPressed()

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

* perf: avoid redundant map lookup in GlobalShortcut::ExecuteCommand()

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-25 13:09:14 -05:00
trop[bot]
5cddcdf190
perf: don't wait for thumbnails if they were not requested on macOS (#46251)
When using the SCK thumbnail capturer, the first refresh has the list of
sources, and the second refresh has the thumbnails. If thumbnails are
not needed, only wait for the first refresh.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Beutner <beutner.john@gmail.com>
2025-03-25 10:03:08 -05:00
trop[bot]
25e5055065
feat: add BrowserWindow.isSnapped() (#46226)
* feat: add BrowserWindow.isSnapped() on Windows

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* docs: mark _Readonly_

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-03-25 08:16:13 -05:00
trop[bot]
7ee88bbdcb
fix: NODE_OPTIONS parsing for child processes on macOS (#46243) 2025-03-25 08:47:06 +01:00
trop[bot]
96197d9597
fix: handle OnDelegatedSourceListDismissed asynchronously (#46235) 2025-03-25 08:39:04 +01:00
trop[bot]
76fa5b7af1
perf: use absl::flat_hash_map instead of std::unordered_map (#46217)
* perf: make ElectronUsbDelegate::controller_map_ an absl::flat_hash_map

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

* perf: make ElectronSerialDelegate::controller_map_ an absl::flat_hash_map

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

* perf: make ElectronHidDelegate::controller_map_ an absl::flat_hash_map

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

* perf: make FrameTreeNodeIdMap an absl::flat_hash_map

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

* perf: make AutofillDriverFactory::driver_map_ an absl::flat_hash_map

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

* perf: make asar::Archive::external_files_ an absl::flat_hash_map

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

* perf: make VersionIdMap an absl::flat_hash_map

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

* perf: make ObjectCache::proxy_map_ an absl::flat_hash_map

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

* docs: add TODO to investigate absl map in KeyWeakMap

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-24 09:30:52 -05:00
trop[bot]
5f0be2e153
refactor: remove unused field ServiceWorkerMain::weak_factory_ (#46205)
refactor: remove unused field ServiceWorkerMain::weak_factory_

Added in a467d06, appears to have never been used

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-23 10:26:24 -05:00
trop[bot]
dea35330c0
refactor: use = default to define trivial destructors (#46190)
refactor: use '= default' to define trivial destructors

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-22 11:10:54 -05:00
trop[bot]
33bde96d73
refactor: reduce coupling in electron::api::Protocol (#46182)
* refactor: decouple api::Protocol from ElectronBrowserContext

now they do not know about each other

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

* refactor: make electron::api::ProtocolError private

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

* refactor: remove unused isolate arg in Protocol constructor

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

* refactor: use =default for trivial destructor

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-21 12:54:11 -05:00
trop[bot]
1ba56c8696
fix: APNS token ids are lowercase ASCII (#46149)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-03-20 16:52:23 -05:00
trop[bot]
7ea2daf456
refactor: add ElectronBrowserContext::GetDefaultBrowserContext() (#46086)
* refactor: add ElectronBrowserContext::DestroyAllContexts()

Simpler semantics than previous implementation; also hides the
"default context must be destroyed last" implementation detail.

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

* refactor: add ElectronBrowserContext::GetDefaultBrowserContext()

clearer semantics than everyone calling From("", false)

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-17 16:50:09 -05:00
trop[bot]
bc9389df9a
refactor: use GetDefaultStoragePartition() instead of GetStoragePartition(nullptr) (#46083)
refactor: use GetDefaultStoragePartition()

Use GetDefaultStorageParition() instead of GetStoragePartition(nullptr)

- It improves code uniformity, since we use get-default everywhere else
- It's more readable
- It's marginally faster, since GetStoragePartition() has more steps

Added in 49b0a1bf4a

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-17 19:43:52 +01:00
trop[bot]
c5310fff80
refactor: replace base::StringPrintf() calls with absl::StrFormat() (#46050)
The former is now a pass-through for the latter and is slated for removal

Xref: https://issues.chromium.org/issues/40241565

4907781

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-15 09:06:12 -05:00
trop[bot]
4b72738b41
refactor: remove unused system header includes (#46043)
* chore: remove unused #include <string>

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

* chore: remove unused #include <optional>

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

* chore: remove unused #include <vector>

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

* chore: remove unused #include <string_view>

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

* chore: remove unused #include <memory>

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

* chore: remove unused #include <utility>

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

* chore: remove unused #include <tuple>

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

* chore: remove unused #include <unordered_set>

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

* chore: remove unused #include <functional>

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

* chore: iwyu <set>

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

* chore: iwyu <map>

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-14 17:06:04 -05:00
trop[bot]
c87fd357fc
fix: prevent title change for within page navigation (#46036)
* fix: prevent title change for on page navigation

Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>

* add back and forward testing

Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>

* update Chromium comment

Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>

* remove errant script tag

Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>
2025-03-14 11:01:31 -05:00
trop[bot]
3e5cabde39
refactor: use private inheritance from mojo::MessageReceiver (#45996)
* refactor: make UtilityProcessWrapper inherit privately from mojo::MessageReceiver

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

* refactor: make ParentPort inherit privately from mojo::MessageReceiver

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

* refactor: make MessagePort inherit privately from mojo::MessageReceiver

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-12 23:20:55 -05:00