feat: expose system preferences to utility process (#42203)

* chore: expose  system preferences to utility process

* chore: add tests, doc changes and module-list update

* relative link

* use @

* fix test

* chore: disable linux test

* kick

* noop on windows utility process
This commit is contained in:
George Xu 2024-06-20 08:15:57 -07:00 committed by GitHub
parent 37608933ae
commit ba8ad4716b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 29 additions and 5 deletions

View file

@ -159,6 +159,8 @@ std::string SystemPreferences::GetMediaAccessStatus(
}
void SystemPreferences::InitializeWindow() {
if (electron::IsUtilityProcess())
return;
// Wait until app is ready before creating sys color listener
// Creating this listener before the app is ready causes global shortcuts
// to not fire

View file

@ -100,9 +100,10 @@
V(electron_renderer_ipc) \
V(electron_renderer_web_frame)
#define ELECTRON_UTILITY_BINDINGS(V) \
V(electron_browser_event_emitter) \
V(electron_common_net) \
#define ELECTRON_UTILITY_BINDINGS(V) \
V(electron_browser_event_emitter) \
V(electron_browser_system_preferences) \
V(electron_common_net) \
V(electron_utility_parent_port)
#define ELECTRON_TESTING_BINDINGS(V) V(electron_common_testing)