Commit graph

29271 commits

Author SHA1 Message Date
trop[bot]
6dea52b6c0
refactor: make NativeWindow::pending_transitions_ a base::queue (#47182)
refactor: make NativeWindow::pending_transitions a base::queue

Follow the base/containers/README.md advice that "Chromium code should
always use `base::circular_deque` or `base::queue` in preference to
`std::deque` or `std::queue` due to memory usage and platform variation."

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-21 10:27:11 +02:00
trop[bot]
cadaaaf714
refactor: make NativeWindow::has_client_frame_ const (#47179)
* refactor: make NativeWindow::has_client_frame_ const

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

* refactor: make NativeWindow::has_client_frame_ const but not constexpr

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-05-20 21:02:35 -05:00
trop[bot]
ef6a71a0c6
build: update_depot_tools on initial install (#47166)
this ensures that python is setup for proper use from depot_tools

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-20 20:56:04 +02:00
trop[bot]
6350b7535f
fix: prevent gc monitor 2nd pass crash (#47163)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: reito <cnschwarzer@qq.com>
2025-05-20 11:56:19 -05:00
electron-roller[bot]
577ea02d64
chore: bump node to v22.15.1 (36-x-y) (#47103)
* chore: bump node in DEPS to v22.15.1

* chore: fixup patch indices

* src: fix error handling on async crypto operations

https://github.com/nodejs-private/node-private/pull/709

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-20 13:32:45 +02:00
trop[bot]
ef9a67e00b
build(dev-deps): update @electron/lint-roller and markdownlint-cli2 (#47146)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-20 09:51:42 +02:00
trop[bot]
0bd0c54cea
refactor: NativeWindows should prefer widget() over GetWidget() for internal use (#47153)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-19 17:22:55 -05:00
electron-roller[bot]
7d73997d5f
chore: bump chromium to 136.0.7103.113 (36-x-y) (#47093)
* chore: bump chromium in DEPS to 136.0.7103.113

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-19 11:12:15 -04:00
trop[bot]
8f908ffce2
perf: don't create unused menuitem icons (#47128)
GTK >= 3.90.0 removed support for menuitem icons. When Electron is
built with GTK >= 3.90.0, our code builds these icons and then throws
them away unused. Instead, let's just not build them.

Our gtk_util::GdkPixbufFromSkBitmap utility uses BGRAToRGBA and is
expensive to call.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-16 11:05:26 -05:00
trop[bot]
ae232703de
refactor: make TrackableObject::weak_map_id() constexpr (#47116)
* refactor: make TrackableObject::weak_map_id() constexpr

refactor: make BaseWindow::GetID() inline and constexpr

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

* refactor: make NativeWindow::window_id() constexpr too

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-05-16 02:32:44 -05:00
trop[bot]
747b2f62e0
fix: opening package paths as directory on macOS (#47109)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-16 12:17:07 +09:00
trop[bot]
6eac8d8af9
refactor: decouple NativeWindowViews and GlobalMenuBarX11 (#47118)
The GlobalMenuBar used to hold a raw_ptr reference to its NativeWindow;
but since it doesn't use it & only wants the gfx::AcceleratedWidget info,
let's remove the NativeWindowViews reference.

AFAICT, GlobalMenuBarX11::window_ has never been used

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-15 19:38:56 -05:00
trop[bot]
4f9bca79d3
test: fix desktopCapturer mocha syntax (#47114)
do not nest `it` calls in desktopCapturer specs

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-15 19:38:21 -05:00
trop[bot]
12528c6739
docs: add note on DIP and DPI (#47120)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-05-15 17:16:29 -05:00
trop[bot]
9c3331ea83
feat: add support for --experimental-network-inspection (#47030)
* feat: add support for `--experimental-network-inspection`

Co-authored-by: Aman Karmani <aman@tmm1.net>

* docs: fix minor formatting issues

visible on both GH[1] and the docs site[2]

[1] https://github.com/electron/electron/blob/main/docs/api/command-line-switches.md#nodejs-flags
[2] https://www.electronjs.org/docs/latest/api/command-line-switches#--inspect-brkhostport

Co-authored-by: Aman Karmani <aman@tmm1.net>

* docs: add entry for new nodejs flag

Co-authored-by: Aman Karmani <aman@tmm1.net>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Aman Karmani <aman@tmm1.net>
2025-05-15 12:23:45 -07:00
trop[bot]
6a0e31633a
feat: enable innerWidth and innerHeight for window open (#47038)
feat: enable innerWidth and innerHeight for window open (#46749)

* feat: enable innerWidth and innerHeight for window open

* update comment for added special innerWidth and innerHeight

* update 100 min spec requirement handling

* update testing to include getContentSize

* update macOS min requirement handling

* adjust refactored consts

* update const values from nativewindowviews

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
2025-05-15 12:23:17 -07:00
trop[bot]
8b2b155c5d
feat: enable secondary label for macOS menu (#47040)
* feat: enable secondary label for macOS menu

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

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

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

Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>

* fix for lint

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

* update docs for sublabel

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>
Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
2025-05-15 12:22:41 -07:00
trop[bot]
de81d8a4a6
refactor: use kKeyModifiers in IsAltModifier() (#47090)
We probably didn't use this before because IsAltModifier() was written
two years before the KeyModifiers mask was added upstream in 98ec378a.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-14 12:18:10 -05:00
trop[bot]
748977b1d8
fix: webview crash on focus (#47037)
* fix: webview crash on focus

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

* fixup! fix: webview crash on focus

chore: fix .patches shear

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-11 21:18:43 -05:00
trop[bot]
bc553af826
fix: white window flicker on window creation (#47053)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-11 15:00:07 -05:00
trop[bot]
615b65b2a2
docs: unify [!NOTE] structure (#47047)
* docs: unify [!NOTE] structure

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

* Update docs/api/command-line.md

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

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

* Update docs/api/browser-window.md

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

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

* Update docs/api/download-item.md

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

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

* Update docs/api/global-shortcut.md

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

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

* revert line break

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2025-05-09 17:45:54 -05:00
trop[bot]
7030816fe1
fix: restore previous Windows screenshotting (#47032)
Fixes https://github.com/electron/electron/issues/45990

We previously made a change in https://github.com/electron/electron/pull/45868
to fix content protection being lost on hide and re-show. However, this
cause a breaking change where protected windows were made opaque black
instead of being hidden as before. This overrides relevant methods in
ElectronDesktopWindowTreeHostWin to restore the previous behavior.
without regressing the original issue.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-09 13:10:19 -04:00
trop[bot]
f5bb2f480d
build: update hasher return value (#47012)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2025-05-09 12:53:11 -04:00
trop[bot]
07c0357366
fix: use-after-move of bus connection in xdg portal detection (#47024)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-09 09:28:05 -04:00
electron-roller[bot]
c7d9fb602e
chore: bump chromium to 136.0.7103.93 (36-x-y) (#46974)
* chore: bump chromium in DEPS to 136.0.7103.93

* chore: update patches

* ozone/wayland: Fix bookmark dropdown right click context menu

6488801

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-09 09:51:20 +02:00
trop[bot]
be43a76440
refactor: use gin_helper::Dictionary::ValueOrDefault() (#47015)
refactor: use `gin_helper::Dictionary::ValueOrDefault()` (#46982)

* refactor: use ValueOrDefault() in electron_api_web_contents.cc

* refactor: use ValueOrDefault() in electron_api_url_loader.cc

* refactor: use ValueOrDefault() in electron_download_manager_delegate.cc

* refactor: use ValueOrDefault() in electron_touch_bar.mm

* refactor: use ValueOrDefault() in electron_url_loader_factory.cc

* refactor: use ValueOrDefault() in electron_browser_context.cc

* refactor: use ValueOrDefault() in electron_touch_bar.mm

* refactor: use ValueOrDefault() in blink_converter.cc

* feat: add ValueOrDefault() to PersistentDictionary

* empty commit

* refactor: use ValueOrDefault() in blink_converter.cc

* refactor: inline the rectangle base::Value::Dict

* refactor: remove has_scroll temporary

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-09 09:36:55 +02:00
trop[bot]
de7cf88f17
refactor: reduce use of NativeWidgetPrivate (#47005)
* refactor: do not use native_widget_private() in NativeWindowViews::SetContentProtection()

refactor: do not use native_widget_private() in NativeWindowViews::IsContentProtected()

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

* refactor: do not use native_widget_private() in NativeWindowViews::Show()

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

* chore: remove native_widget_private #include from native_window_views_win

Not needed since Feb 2025: 9199d5c6

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-05-08 15:34:05 -05:00
trop[bot]
12dd4d91bd
build: move release script to new hasher function (#46996)
build: move to new hasher function

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2025-05-08 09:32:54 -07:00
trop[bot]
3c9e7f97a1
test: enable hasShadow tests on Linux (#47000)
refactor: enable hasShadow tests on Linux

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-08 09:37:23 -05:00
trop[bot]
b822478057
fix: printing when no mediaSize specified (#46972)
fix: printing when no mediaSize specified

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-07 09:36:13 +02:00
trop[bot]
366daf192a
refactor: add gin_helper::Dictionary::ValueOrDefault() (#46968)
* feat: add gin_helper::Dictionary::ValueOrDefault()

A convenience function for using a default value if the
specified key isn't present in the dictionary.

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

* refactor: use ValueOrDefault() in native_window.cc

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

* refactor: use ValueOrDefault() in native_window_mac.mm

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

* refactor: use ValueOrDefault() in native_window_views.cc

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

* refactor: use ValueOrDefault() in electron_api_native_image.cc

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-05-06 18:50:12 -05:00
trop[bot]
7779b6a4ad
test: test menu rendering accelerators (#46966)
* test: test menu rendering accelerators

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

* Update spec/api-menu-spec.ts

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

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-05-06 15:56:15 -05:00
trop[bot]
695448e142
refactor: pass gfx::ResizeEdge by value (#46962)
refactor: pass gfx::ResizeEdge by value

It is an enum class, so no reason to pass by reference

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-06 14:37:34 -05:00
trop[bot]
fdc322c93f
fix: crash on macOS dialog after window-all-closed (#46951)
fix: crash on dialog after window-all-closed

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-06 14:11:37 -05:00
trop[bot]
13fe994d0d
fix: allowed dialog file types with one filter (#46945)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-06 16:12:09 +02:00
trop[bot]
7240a14126
refactor: remove some NativeWindow public API (36-x-y) (#46944)
refactor: remove some `NativeWindow` public API (#46919)

* refactor: make NativeWindow::titlebar_overlay_height_ private

* refactor: make NativeWindow::set_has_frame() protected

* refactor: remove NativeWindow::background_material()

It's only used once, in NativeWindow, so use |background_material_| directly.

* refactor: remove NativeWindow::vibrancy()

It's only used once, in a NativeWindow method, so use |vibrancy_| directly.

* refactor: unfriend api::BrowserView

It was added in Oct 2022 by 23d4a25 for access to protected NativeWindow
methods add_inspectable_view() and remove_inspectable_view().

That dependency was removed in Nov 2022 by 184ac2b, so BrowserView
doesn't need access to NativeWindow's private fields & methods anymore.

* refactor: make NativeWindow::ContentBoundsToWindowBounds() protected

refactor: make NativeWindow::WindowBoundsToContentBounds() protected

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-06 07:44:48 -05:00
electron-roller[bot]
3f23f01762
chore: bump node to v22.15.0 (36-x-y) (#46741) 2025-05-06 13:07:59 +02:00
Charles Kerr
5223225fb5
refactor: add NativeWindow::FromWidget() helper (36-x-y) (#46932)
refactor: add `NativeWindow::FromWidget()` helper (#46917)

refactor: add NativeWindow::FromWidet() helper

refactor: make kElectronNativeWindowKey a protected field
2025-05-06 09:51:11 +02:00
trop[bot]
5045ba29a5
docs: use correct heading level for API function (#46940)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-05-05 16:27:56 -05:00
Charles Kerr
c27bd7bb3c
refactor: simplify NativeWindow::FullScreenTransitionState (36-x-y) (#46933)
refactor: simplify `NativeWindow::FullScreenTransitionState` (#46918)

* refactor: make NativeWindow::fullscreen_transition_state_ private

* refactor: add NativeWindow::is_transitioning_fullscreen() helper

* refactor: remove unused NativeWindow::fullscreen_transition_state()

* refactor: replace NativeWindow::set_fullscreen_transition_state() with NativeWindow::set_is_transitioning_fullscreen()

refactor: remove unused NativeWindow::FullScreenTransitionState
2025-05-05 14:54:00 -04:00
trop[bot]
aada99e53d
refactor: devirtualize NativeWindow methods (#46930)
* refactor: devirtualize NativeWindow::SetSize()

refactor: devirtualize NativeWindow::GetSize()

refactor: devirtualize NativeWindow::SetPosition()

refactor: devirtualize NativeWindow::GetPosition()

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

* refactor: devirtualize NativeWinodw::SetMinimumSize()

refactor: devirtualize NativeWinodw::GetMinimumSize()

refactor: devirtualize NativeWinodw::SetMaximumSize()

refactor: devirtualize NativeWinodw::GetMaximumSize()

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

* refactor: devirtualize NativeWindow::SetSheetOffset()

refactor: devirtualize NativeWindow::GetSheetOffsetX()

refactor: devirtualize NativeWindow::GetSheetOffsetY()

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

* refactor: devirtualize NativeWindow::GetContentMinimumSize()

refactor: devirtualize NativeWindow::GetContentMaximumSize()

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-05-05 12:59:31 -04:00
trop[bot]
1b596f6261
fix: prevent log files being written to current directory on Windows (#46912)
* fix: prevent log files being written to current directory on Windows

Co-authored-by: Derek Cicerone <derekcicerone@gmail.com>

* Update shell/common/logging.cc

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

Co-authored-by: Derek Cicerone <120135886+derekcicerone@users.noreply.github.com>

* chore: add test

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

* chore: update includes

Refs 6418805

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

* chore: address review feedback

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

* chore: update includes

Refs 6418805

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Derek Cicerone <derekcicerone@gmail.com>
Co-authored-by: Derek Cicerone <120135886+derekcicerone@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-05 12:50:30 +02:00
trop[bot]
bac01a33cd
fix: xdg portal version detection for file dialogs on linux (#46923)
* chore: use dbus thread for portal version detection

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

* Update shell/browser/ui/file_dialog_linux_portal.cc

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

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-05 12:50:20 +02:00
trop[bot]
bb4ab67e52
docs: clarified usage of createFromPath() (#46899)
* docs: clarified usage of createFromPath()

Co-authored-by: Yuri <rarescrap@gmail.com>

* Update docs/api/native-image.md

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

Co-authored-by: Yuri <rarescrap@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Yuri <rarescrap@gmail.com>
2025-05-02 09:49:52 -04:00
trop[bot]
17e1ff2675
refactor: use base::ObserverList::Notify() (#46897)
* refactor: use ObserverList::Notify() in shell/browser/window_list.cc

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

* refactor: use ObserverList::Notify() in shell/browser/web_contents_zoom_controller.cc

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

* refactor: use ObserverList::Notify() in shell/browser/usb/usb_chooser_context.cc

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

* refactor: use ObserverList::Notify() in shell/browser/usb/electron_usb_delegate.cc

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

* refactor: use ObserverList::Notify() in shell/browser/ui/views/menu_delegate.cc

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

* refactor: use ObserverList::Notify() in shell/browser/ui/tray_icon.cc

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

* refactor: use ObserverList::Notify() in shell/browser/ui/electron_menu_model.cc

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

* refactor: use ObserverList::Notify() in shell/browser/serial/serial_chooser_context.cc

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

* refactor: use ObserverList::Notify() in shell/browser/native_window.cc

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

* refactor: use ObserverList::Notify() in shell/browser/serial/electron_serial_delegate.cc

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

* refactor: use ObserverList::Notify() in shell/browser/browser.cc

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

* refactor: use ObserverList::Notify() in shell/browser/api/electron_api_web_contents.cc

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

* refactor: use ObserverList::Notify() in shell/browser/hid/electron_hid_delegate.cc

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

* refactor: use ObserverList::Notify() in shell/browser/hid/hid_chooser_context.cc

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-05-02 07:51:05 -05:00
trop[bot]
1687b95849
fix: revert macOS content protection logic refactor (#46890)
Revert "refactor: use upstream content protection logic on macOS (#46813)"

This reverts commit 34adb976b6.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2025-05-01 14:57:32 -07:00
Aman Karmani
3d4a4b9343
feat: add support for --js-flags=--perf-prof on macOS (#46876)
* feat: add support for `--js-flags=--perf-prof` on macOS

allows for profiling of macOS electron apps using samply[1],
which can capture cpu usage for an entire process tree, including
both c/c++ frames and interpreted + jit-compiled JS stack frames

[1] https://github.com/mstange/samply

* chore: update patches

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2025-05-01 09:46:10 -05:00
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
Robo
ee65ab75f5
fix: display id order validation on certain versions of Windows 10 (#46874) 2025-05-01 09:22:43 +09:00
trop[bot]
77b945dd0a
fix: enable some tests that were accidentally disabled (#46844)
* fix: tests that were not run in api-app-spec due to nested it()

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

* fix: tests that were not run in api-browser-window-spec due to nested it()

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

* chore: annotate disabled test

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-30 12:16:41 -05:00