electron/shell/browser
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
..
api feat: expose nativeTheme.shouldUseDarkColorsForSystemIntegratedUI (#46599) 2025-04-16 19:40:51 +02:00
badging chore: bump chromium to 133.0.6920.0 (main) (#45055) 2025-01-10 10:52:34 -06:00
bluetooth chore: bump chromium to 131.0.6734.0 (main) (#43769) 2024-09-25 06:19:39 -05:00
extensions perf: avoid redundant map lookup in AddComponentResourceEntries() (#46288) 2025-03-26 18:04:15 -05:00
file_system_access fix: warning in file picker UI (#46074) 2025-03-17 10:53:23 +01:00
hid perf: avoid redundant map lookup in HidChooserContext::DeviceChanged() (#46481) 2025-04-03 20:30:36 -05:00
lib chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
linux fix: modernize-use-using clang-tidy warnings (#44806) 2024-11-25 10:50:33 -05:00
mac fix: APNS token ids are lowercase ASCII (#46148) 2025-03-20 19:31:20 -05:00
media chore: iwyu mojom-forward header files (#43741) 2024-09-17 12:58:56 -07:00
net refactor: add ElectronBrowserContext::GetDefaultBrowserContext() (#46085) 2025-03-26 11:31:31 +01:00
notifications perf: avoid a double-map lookup in NotificationPresenter::RemoveNotification() (#46356) 2025-03-29 08:12:04 -05:00
osr perf: prefer absl::flat_hash_set over std::set when sorted order is not needed (#46441) 2025-04-03 20:28:53 -05:00
plugins perf: avoid unnecessary vector copy in GetMimeTypeToExtensionIdMap() (#46395) 2025-04-01 09:07:45 -05:00
printing fix: misc-use-internal-linkage warnings (#44843) 2024-11-27 10:40:39 -06:00
resources build: add NSPrefersDisplaySafeAreaCompatibilityMode = false to Info.plist (#45357) 2025-01-29 19:55:03 +01:00
serial refactor: use base::NumberToString() (#46154) 2025-03-20 18:20:17 -05:00
ui fix: window border on Gnome Wayland (#46644) 2025-04-15 20:56:30 +02:00
usb perf: prefer absl::flat_hash_set over std::set when sorted order is not needed (#46441) 2025-04-03 20:28:53 -05:00
webauthn chore: bump chromium to 134.0.6998.3 (35-x-y) (#45460) 2025-02-07 11:14:12 -05:00
win chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
animation_util.h feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
animation_util_mac.mm feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
auto_updater.cc build: make is_mas_build a generated header instead of config (#43737) 2024-09-17 01:38:56 -07:00
auto_updater.h fix: modernize-use-equals-default warnings (#44935) 2024-12-03 16:25:48 -06:00
auto_updater_mac.mm chore: bump chromium to 120.0.6099.0 (main) (#40316) 2023-11-01 10:02:12 -04:00
background_throttling_source.h fix: disable background throttling also in the viz::DisplayScheduler (#38924) 2023-09-26 16:00:46 -04:00
browser.cc chore: remove unused base/ includes (#43688) 2024-09-12 16:05:37 +02:00
browser.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
browser_linux.cc refactor: fix modernize-return-braced-init-list warnings (#44838) 2024-11-27 09:41:46 +09:00
browser_mac.mm build: make is_mas_build a generated header instead of config (#43737) 2024-09-17 01:38:56 -07:00
browser_observer.h fix: modernize-use-equals-default warnings (#44935) 2024-12-03 16:25:48 -06:00
browser_process_impl.cc chore: bump chromium to 129.0.6668.0 (main) (#43368) 2024-08-20 16:54:27 +02:00
browser_process_impl.h chore: bump chromium to 134.0.6998.10 (35-x-y) (#45585) 2025-02-19 12:09:35 +01:00
browser_win.cc refactor: return-braced-init-list pt 2 of 2 (#44870) 2024-11-29 11:44:33 -06:00
certificate_manager_model.cc refactor: remove deprecated BrowserContext::ResourceContext (#41221) 2024-02-05 18:12:34 -06:00
certificate_manager_model.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
child_web_contents_tracker.cc chore: bump chromium to 99.0.4767.0 (main) (#31986) 2022-01-10 17:31:39 -05:00
child_web_contents_tracker.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
cookie_change_notifier.cc chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
cookie_change_notifier.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
draggable_region_provider.h refactor: move draggable regions to WebContents (#36230) 2022-11-07 10:15:57 -08:00
electron_api_ipc_handler_impl.cc chore: remove deprecated ipcRenderer.sendTo() (#39087) 2023-08-28 10:29:27 -04:00
electron_api_ipc_handler_impl.h feat: route deprecated sync clipboard read through permission checks (#45471) 2025-02-05 14:10:43 -05:00
electron_api_sw_ipc_handler_impl.cc feat: service worker preload scripts for improved extensions support … (#45408) 2025-02-05 14:18:24 -05:00
electron_api_sw_ipc_handler_impl.h feat: service worker preload scripts for improved extensions support … (#45408) 2025-02-05 14:18:24 -05:00
electron_autofill_driver.cc feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
electron_autofill_driver.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
electron_autofill_driver_factory.cc refactor: use C++20's contains() method (35-x-y) (#45768) 2025-02-21 20:45:54 -06:00
electron_autofill_driver_factory.h refactor: prefer to inherit observer classes privately (#41360) 2024-05-21 14:21:31 -05:00
electron_browser_client.cc perf: avoid 3x call to GetID() in RegisterPendingSiteInstance() (#46358) 2025-03-29 10:59:47 -05:00
electron_browser_client.h chore: bump chromium to 133.0.6943.35 (35-x-y) (#45217) 2025-02-03 15:10:57 -05:00
electron_browser_context.cc refactor: add ElectronBrowserContext::GetDefaultBrowserContext() (#46085) 2025-03-26 11:31:31 +01:00
electron_browser_context.h refactor: add ElectronBrowserContext::GetDefaultBrowserContext() (#46085) 2025-03-26 11:31:31 +01:00
electron_browser_main_parts.cc refactor: Add ElectronBrowserContext::BrowserContexts() (35-x-y backport) (#46161) 2025-03-21 11:50:16 -04:00
electron_browser_main_parts.h chore: iwyu mojom-forward header files (#43741) 2024-09-17 12:58:56 -07:00
electron_browser_main_parts_linux.cc refactor: move impl classes into unnamed namespaces (#42390) 2024-06-10 17:00:20 -05:00
electron_browser_main_parts_mac.mm chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_browser_main_parts_posix.cc chore: bump chromium to 133.0.6846.0 (main) (#44665) 2024-11-19 19:52:20 -08:00
electron_crypto_module_delegate_nss.cc fix: -Wunsafe-buffer-usage warning in ChunkedDataPipeReadableStream (#44211) 2024-10-14 10:46:24 +02:00
electron_crypto_module_delegate_nss.h feat: Implement password delegate for NSS (#41205) 2024-07-17 09:48:03 -04:00
electron_download_manager_delegate.cc refactor: remove unused system header includes (#46042) 2025-03-15 00:33:33 -05:00
electron_download_manager_delegate.h refactor: track downloads by guid (#45718) 2025-02-20 08:17:18 +01:00
electron_gpu_client.cc chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
electron_gpu_client.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
electron_navigation_throttle.cc chore: bump chromium to 127.0.6521.0 (main) (#42118) 2024-06-07 17:18:35 -04:00
electron_navigation_throttle.h chore: add/fix interface comments for sections of methods (#42566) 2024-06-20 10:49:07 +02:00
electron_pdf_document_helper_client.cc chore: bump chromium to 133.0.6846.0 (main) (#44665) 2024-11-19 19:52:20 -08:00
electron_pdf_document_helper_client.h chore: bump chromium to 134.0.6998.10 (35-x-y) (#45585) 2025-02-19 12:09:35 +01:00
electron_permission_manager.cc feat: route deprecated sync clipboard read through permission checks (#45471) 2025-02-05 14:10:43 -05:00
electron_permission_manager.h chore: bump chromium to 130.0.6695.0 (main) (#43454) 2024-09-17 18:12:11 -07:00
electron_plugin_info_host_impl.cc chore: bump chromium to 129.0.6650.0 (main) (#43266) 2024-08-12 10:28:33 +02:00
electron_plugin_info_host_impl.h chore: bump chromium to 129.0.6650.0 (main) (#43266) 2024-08-12 10:28:33 +02:00
electron_speech_recognition_manager_delegate.cc refactor: do not subclass ElectronSpeechRecognitionManagerDelegate from SpeechRecognitionEventListener (#42806) 2024-07-10 15:32:50 +02:00
electron_speech_recognition_manager_delegate.h refactor: do not subclass ElectronSpeechRecognitionManagerDelegate from SpeechRecognitionEventListener (#42806) 2024-07-10 15:32:50 +02:00
electron_web_contents_utility_handler_impl.cc fix: avoid IPC for renderer webFrame.getZoom... APIs (#45557) 2025-02-13 12:53:59 +01:00
electron_web_contents_utility_handler_impl.h refactor: remove unused system header includes (#46042) 2025-03-15 00:33:33 -05:00
electron_web_ui_controller_factory.cc refactor: remove unnecessary const_cast (#46568) 2025-04-08 17:12:41 -05:00
electron_web_ui_controller_factory.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
event_emitter_mixin.h chore: migrate base::StringPiece to std::string_view (#40915) 2024-01-10 19:00:37 -06:00
extended_web_contents_observer.h fix: modernize-use-equals-default warnings (#44935) 2024-12-03 16:25:48 -06:00
fake_location_provider.cc chore: remove unused base/ includes (#43688) 2024-09-12 16:05:37 +02:00
fake_location_provider.h chore: bump chromium to 116.0.5845.0 (main) (#38827) 2023-06-22 10:51:15 +02:00
feature_list.cc fix: build failure when printing is disabled (#46285) 2025-03-26 12:48:46 +01:00
feature_list.h feat: add support for system picker in setDisplayMediaRequestHandler (#43581) 2024-09-10 16:05:57 -07:00
feature_list_mac.mm feat: add support for system picker in setDisplayMediaRequestHandler (#43581) 2024-09-10 16:05:57 -07:00
file_select_helper.cc refactor: return-braced-init-list pt 2 of 2 (#44870) 2024-11-29 11:44:33 -06:00
file_select_helper.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
file_select_helper_mac.mm refactor: replace remaining NULL with nullptr (#40053) 2023-10-03 12:26:35 -07:00
font_defaults.cc fix: resolve font list in default prefernce values (#45918) 2025-03-07 16:24:09 +01:00
font_defaults.h fix: resolve font list in default prefernce values (#45918) 2025-03-07 16:24:09 +01:00
javascript_environment.cc refactor: remove unused system header includes (#46042) 2025-03-15 00:33:33 -05:00
javascript_environment.h fix: support for v8.setHeapSnapshotNearHeapLimit api (#45632) 2025-02-17 13:23:38 +09:00
login_handler.cc chore: bump chromium to 131.0.6762.0 (main) (#44117) 2024-10-07 18:06:47 -05:00
login_handler.h chore: bump chromium to 131.0.6762.0 (main) (#44117) 2024-10-07 18:06:47 -05:00
microtasks_runner.cc perf: remove isolate scope from DidProcessTask() (#44439) 2024-10-29 23:25:40 -05:00
microtasks_runner.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
native_window.cc fix: NativeWindow.window_id() returns same value for all windows (#46591) 2025-04-09 16:05:41 -05:00
native_window.h fix: NativeWindow.window_id() returns same value for all windows (#46591) 2025-04-09 16:05:41 -05:00
native_window_features.cc chore: bump chromium to 127.0.6521.0 (main) (#42118) 2024-06-07 17:18:35 -04:00
native_window_features.h fix: Add support for Wayland window decorations (#29618) 2022-01-26 13:59:09 -08:00
native_window_mac.h fix: setContentProtection(true) after hide on Windows (#45889) 2025-03-05 06:13:36 +01:00
native_window_mac.mm fix: paint and flash issues on macOS (#46628) 2025-04-15 20:33:15 +02:00
native_window_observer.h fix: modernize-use-equals-default warnings (#44935) 2024-12-03 16:25:48 -06:00
native_window_views.cc perf: avoid redundant virtual method call in NativeWindowViews::SetEnabledInternal() (#46526) 2025-04-06 23:44:37 -05:00
native_window_views.h perf: prefer absl::flat_hash_set over std::set when sorted order is not needed (#46441) 2025-04-03 20:28:53 -05:00
native_window_views_win.cc perf: prefer absl::flat_hash_set over std::set when sorted order is not needed (#46441) 2025-04-03 20:28:53 -05:00
network_hints_handler_impl.cc chore: bump chromium to 133.0.6920.0 (main) (#45055) 2025-01-10 10:52:34 -06:00
network_hints_handler_impl.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
preload_script.h feat: redesign preload APIs (#45329) 2025-01-31 09:46:17 -05:00
protocol_registry.cc perf: prefer GURL string_view getters (#43443) 2024-08-23 17:15:45 -05:00
protocol_registry.h perf: prefer GURL string_view getters (#43443) 2024-08-23 17:15:45 -05:00
relauncher.cc refactor: remove unused system header includes (#46042) 2025-03-15 00:33:33 -05:00
relauncher.h refactor: reduce scope of relauncher's internal constants (#44860) 2024-11-30 06:54:40 -06:00
relauncher_linux.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
relauncher_mac.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
relauncher_win.cc refactor: reduce scope of relauncher's internal constants (#44860) 2024-11-30 06:54:40 -06:00
session_preferences.cc feat: service worker preload scripts for improved extensions support … (#45408) 2025-02-05 14:18:24 -05:00
session_preferences.h feat: service worker preload scripts for improved extensions support … (#45408) 2025-02-05 14:18:24 -05:00
special_storage_policy.cc chore: remove unused base/ includes (#43688) 2024-09-12 16:05:37 +02:00
special_storage_policy.h chore: bump chromium to 106.0.5216.0 (main) (#34993) 2022-08-17 11:35:53 -07:00
web_contents_permission_helper.cc fix: crash on getUserMedia with invalid chromeMediaSourceId (#45755) 2025-02-21 22:19:03 +01:00
web_contents_permission_helper.h feat: route deprecated sync clipboard read through permission checks (#45471) 2025-02-05 14:10:43 -05:00
web_contents_preferences.cc feat: route deprecated sync clipboard read through permission checks (#45471) 2025-02-05 14:10:43 -05:00
web_contents_preferences.h feat: route deprecated sync clipboard read through permission checks (#45471) 2025-02-05 14:10:43 -05:00
web_contents_zoom_controller.cc perf: prefer GURL string_view getters (#43443) 2024-08-23 17:15:45 -05:00
web_contents_zoom_controller.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
web_contents_zoom_observer.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
web_view_guest_delegate.cc chore: bump chromium to 133.0.6920.0 (main) (#45055) 2025-01-10 10:52:34 -06:00
web_view_guest_delegate.h refactor: prefer to inherit observer classes privately (#41360) 2024-05-21 14:21:31 -05:00
web_view_manager.cc chore: bump chromium to 121.0.6147.0 (main) (#40523) 2023-11-28 13:40:12 -08:00
web_view_manager.h perf: use flat_set, flat_map for small, trivially-moved containers (#40817) 2024-01-05 12:18:31 +01:00
window_list.cc chore: remove unused base/ includes (#43688) 2024-09-12 16:05:37 +02:00
window_list.h refactor: migrate deprecated LazyInstance code to NoDestructor (#40927) 2024-01-10 14:01:49 -06:00
window_list_observer.h fix: modernize-use-equals-default warnings (#44935) 2024-12-03 16:25:48 -06:00
zoom_level_delegate.cc refactor: remove unused system header includes (#46042) 2025-03-15 00:33:33 -05:00
zoom_level_delegate.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00