electron/shell/browser/api
trop[bot] 592d0155f1
feat: expose nativeTheme.shouldUseDarkColorsForSystemIntegratedUI (#46599)
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:51 +02:00
..
views chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
electron_api_app.cc refactor: use v8::String::Empty() when creating empty strings (#46372) 2025-03-31 08:56:53 -05:00
electron_api_app.h refactor: remove unused electron::api::App::FileIconCallback (#46511) 2025-04-05 10:44:15 -05:00
electron_api_app_mac.mm chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_api_app_mas.mm chore: bump chromium to 117.0.5923.0 (main) (#39304) 2023-08-04 10:47:29 +02:00
electron_api_auto_updater.cc refactor: only pass v8::Context to gin_helper::MicrotasksScope constructor (#45503) 2025-02-07 10:03:31 +01:00
electron_api_auto_updater.h refactor: declare gin::Wrapper subclasses as final (#43527) 2024-09-04 18:40:02 -05:00
electron_api_base_window.cc refactor: simplify some BaseWindow JS getters (#46564) 2025-04-08 14:46:27 -05:00
electron_api_base_window.h refactor: simplify some BaseWindow JS getters (#46564) 2025-04-08 14:46:27 -05:00
electron_api_browser_window.cc fix: paint and flash issues on macOS (#46628) 2025-04-15 20:33:15 +02:00
electron_api_browser_window.h refactor: unfilter unresponsive events (#44629) 2024-11-13 17:59:13 -08:00
electron_api_content_tracing.cc refactor: in StopTracing(), use string literals instead of optional<string> (#45292) 2025-01-22 09:43:38 -06:00
electron_api_cookies.cc chore: bump chromium to 134.0.6998.10 (35-x-y) (#45585) 2025-02-19 12:09:35 +01:00
electron_api_cookies.h chore: remove unused isolate argument from Cookies constructor (#44907) 2024-12-02 11:34:21 -05:00
electron_api_crash_reporter.cc refactor: fix modernize-return-braced-init-list warnings (#44838) 2024-11-27 09:41:46 +09:00
electron_api_crash_reporter.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_api_data_pipe_holder.cc refactor: return-braced-init-list pt 2 of 2 (#44870) 2024-11-29 11:44:33 -06:00
electron_api_data_pipe_holder.h refactor: declare gin::Wrapper subclasses as final (#43527) 2024-09-04 18:40:02 -05:00
electron_api_debugger.cc refactor: use base::as_string_view() (#45745) 2025-02-21 10:14:05 -06:00
electron_api_debugger.h refactor: declare gin::Wrapper subclasses as final (#43527) 2024-09-04 18:40:02 -05:00
electron_api_desktop_capturer.cc perf: don't wait for thumbnails if they were not requested on macOS (#46249) 2025-03-25 09:08:21 -05:00
electron_api_desktop_capturer.h feat: add support for system picker in setDisplayMediaRequestHandler (#43581) 2024-09-10 16:05:57 -07:00
electron_api_desktop_capturer_mac.mm feat: add support for system picker in setDisplayMediaRequestHandler (#43581) 2024-09-10 16:05:57 -07:00
electron_api_dialog.cc chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
electron_api_download_item.cc refactor: return-braced-init-list pt 2 of 2 (#44870) 2024-11-29 11:44:33 -06:00
electron_api_download_item.h refactor: declare gin::Wrapper subclasses as final (#43527) 2024-09-04 18:40:02 -05:00
electron_api_event_emitter.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_api_event_emitter.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
electron_api_global_shortcut.cc refactor: add ElectronBrowserContext::GetDefaultBrowserContext() (#46085) 2025-03-26 11:31:31 +01:00
electron_api_global_shortcut.h feat: support global shortcuts via GlobalShortcutsPortal feature with ozone/wayland (#45297) 2025-02-27 11:33:12 +01:00
electron_api_in_app_purchase.cc chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
electron_api_in_app_purchase.h refactor: declare gin::Wrapper subclasses as final (#43527) 2024-09-04 18:40:02 -05:00
electron_api_menu.cc fix: misc-use-internal-linkage warnings (#44843) 2024-11-27 10:40:39 -06:00
electron_api_menu.h chore: bump chromium to 132.0.6807.0 (main) (#44360) 2024-11-04 09:10:00 -05:00
electron_api_menu_mac.h chore: bump chromium to 132.0.6807.0 (main) (#44360) 2024-11-04 09:10:00 -05:00
electron_api_menu_mac.mm chore: bump chromium to 132.0.6807.0 (main) (#44360) 2024-11-04 09:10:00 -05:00
electron_api_menu_views.cc chore: bump chromium to 132.0.6807.0 (main) (#44360) 2024-11-04 09:10:00 -05:00
electron_api_menu_views.h chore: bump chromium to 132.0.6807.0 (main) (#44360) 2024-11-04 09:10:00 -05:00
electron_api_native_theme.cc feat: expose nativeTheme.shouldUseDarkColorsForSystemIntegratedUI (#46599) 2025-04-16 19:40:51 +02:00
electron_api_native_theme.h feat: expose nativeTheme.shouldUseDarkColorsForSystemIntegratedUI (#46599) 2025-04-16 19:40:51 +02:00
electron_api_native_theme_mac.mm chore: cleanup arc migration helpers (#39606) 2023-08-23 09:54:21 -04:00
electron_api_net_log.cc refactor: fix modernize-return-braced-init-list warnings (#44838) 2024-11-27 09:41:46 +09:00
electron_api_net_log.h refactor: declare gin::Wrapper subclasses as final (#43527) 2024-09-04 18:40:02 -05:00
electron_api_notification.cc fix: crash in gin::wrappable::secondweakcallback (#45378) 2025-01-29 15:04:08 -08:00
electron_api_notification.h fix: crash in gin::wrappable::secondweakcallback (#45378) 2025-01-29 15:04:08 -08:00
electron_api_power_monitor.cc chore: bump chromium to 131.0.6734.0 (main) (#43769) 2024-09-25 06:19:39 -05:00
electron_api_power_monitor.h chore: bump chromium to 131.0.6734.0 (main) (#43769) 2024-09-25 06:19:39 -05:00
electron_api_power_monitor_mac.mm fix: user-did-{resign|become}-active events on macOS (#41506) 2024-03-06 12:43:39 +01:00
electron_api_power_monitor_win.cc chore: iwyu mojom-forward header files (#43741) 2024-09-17 12:58:56 -07:00
electron_api_power_save_blocker.cc refactor: use C++20's contains() method (35-x-y) (#45768) 2025-02-21 20:45:54 -06:00
electron_api_power_save_blocker.h refactor: declare gin::Wrapper subclasses as final (#43527) 2024-09-04 18:40:02 -05:00
electron_api_printing.cc chore: remove deprecated webContents.getPrinters() (#39663) 2023-09-05 10:16:41 +02:00
electron_api_protocol.cc refactor: reduce coupling in electron::api::Protocol (#46183) 2025-03-21 11:08:59 -05:00
electron_api_protocol.h refactor: reduce coupling in electron::api::Protocol (#46183) 2025-03-21 11:08:59 -05:00
electron_api_push_notifications.cc chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
electron_api_push_notifications.h refactor: declare gin::Wrapper subclasses as final (#43527) 2024-09-04 18:40:02 -05:00
electron_api_push_notifications_mac.mm fix: APNS token ids are lowercase ASCII (#46148) 2025-03-20 19:31:20 -05:00
electron_api_safe_storage.cc refactor: fix modernize-return-braced-init-list warnings (#44838) 2024-11-27 09:41:46 +09:00
electron_api_screen.cc refactor: fix modernize-return-braced-init-list warnings (#44838) 2024-11-27 09:41:46 +09:00
electron_api_screen.h refactor: declare gin::Wrapper subclasses as final (#43527) 2024-09-04 18:40:02 -05:00
electron_api_service_worker_context.cc feat: ServiceWorkerMain (#45341) 2025-01-31 12:40:19 -05:00
electron_api_service_worker_context.h feat: ServiceWorkerMain (#45341) 2025-01-31 12:40:19 -05:00
electron_api_service_worker_main.cc refactor: remove unused system header includes (#46042) 2025-03-15 00:33:33 -05:00
electron_api_service_worker_main.h refactor: remove unused field ServiceWorkerMain::weak_factory_ (#46204) 2025-03-23 14:18:00 -05:00
electron_api_session.cc perf: avoid redundant map lookups in GetStorageMask() (#46345) 2025-03-28 10:57:59 -05:00
electron_api_session.h feat: service worker preload scripts for improved extensions support … (#45408) 2025-02-05 14:18:24 -05:00
electron_api_system_preferences.cc chore: deprecate systemPreferences.isAeroGlassEnabled() (#45554) 2025-02-18 16:29:41 -05:00
electron_api_system_preferences.h chore: deprecate systemPreferences.isAeroGlassEnabled() (#45554) 2025-02-18 16:29:41 -05:00
electron_api_system_preferences_mac.mm chore: bump chromium to 131.0.6734.0 (main) (#43769) 2024-09-25 06:19:39 -05:00
electron_api_system_preferences_win.cc chore: deprecate systemPreferences.isAeroGlassEnabled() (#45554) 2025-02-18 16:29:41 -05:00
electron_api_tray.cc fix: crash in gin::wrappable::secondweakcallback (#45378) 2025-01-29 15:04:08 -08:00
electron_api_tray.h fix: crash in gin::wrappable::secondweakcallback (#45378) 2025-01-29 15:04:08 -08:00
electron_api_utility_process.cc fix: UtilityProcess.fork crash before app ready (#46403) 2025-04-01 14:09:16 -04:00
electron_api_utility_process.h refactor: use private inheritance from mojo::MessageReceiver (#45993) 2025-03-12 23:19:17 -05:00
electron_api_view.cc refactor: make api::View methods const, private (#46552) 2025-04-08 08:53:02 -05:00
electron_api_view.h refactor: make api::View methods const, private (#46552) 2025-04-08 08:53:02 -05:00
electron_api_web_contents.cc refactor: use default printing path when no user options (#46616) 2025-04-11 16:15:38 -04:00
electron_api_web_contents.h fix: build failure when printing is disabled (#46285) 2025-03-26 12:48:46 +01:00
electron_api_web_contents_impl.cc chore: bump chromium to 131.0.6734.0 (main) (#43769) 2024-09-25 06:19:39 -05:00
electron_api_web_contents_mac.mm chore: bump chromium to 127.0.6521.0 (main) (#42118) 2024-06-07 17:18:35 -04:00
electron_api_web_contents_view.cc refactor: remove InspectableWebContentsViewMac in favor of the Views version (#45238) 2025-01-23 11:54:15 +01:00
electron_api_web_contents_view.h feat: customize border radius of Views (#42320) 2024-07-16 20:16:25 -04:00
electron_api_web_frame_main.cc perf: avoid double map lookup in WebFrameMain::UpdateRenderFrameHost() (#46329) 2025-03-27 18:12:11 -05:00
electron_api_web_frame_main.h fix: dangling speculative frames (#45686) 2025-02-18 21:04:36 -05:00
electron_api_web_request.cc refactor: use C++20's contains() method (35-x-y) (#45768) 2025-02-21 20:45:54 -06:00
electron_api_web_request.h feat: add excludeUrls and modify urls in WebRequestFilter for better URL filtering (#45678) 2025-02-20 15:54:58 -05:00
electron_api_web_view_manager.cc chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
frame_subscriber.cc refactor: put empty virtual function definitions in header (#43285) 2024-08-12 09:56:51 +02:00
frame_subscriber.h refactor: put empty virtual function definitions in header (#43285) 2024-08-12 09:56:51 +02:00
gpu_info_enumerator.cc refactor: simplify code by using base::Value::EnsureList() (#41162) 2024-01-30 14:48:09 -06:00
gpu_info_enumerator.h refactor: remove unused system header includes (#46042) 2025-03-15 00:33:33 -05:00
gpuinfo_manager.cc fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8 (#46470) 2025-04-03 20:34:52 -05:00
gpuinfo_manager.h fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8 (#46470) 2025-04-03 20:34:52 -05:00
ipc_dispatcher.h feat: service worker preload scripts for improved extensions support … (#45408) 2025-02-05 14:18:24 -05:00
message_port.cc perf: prefer absl::flat_hash_set over std::unordered_set (#46374) 2025-03-31 08:25:16 -05:00
message_port.h refactor: use private inheritance from mojo::MessageReceiver (#45993) 2025-03-12 23:19:17 -05:00
process_metric.cc build: make is_mas_build a generated header instead of config (#43737) 2024-09-17 01:38:56 -07:00
process_metric.h chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
save_page_handler.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
save_page_handler.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
ui_event.cc chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
ui_event.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00