blob: accdebd37eafaf5219e8e81f6664ff2cf166e358 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--- electron/shell/browser/api/electron_api_power_monitor.cc.orig 2023-08-14 18:19:06 UTC
+++ electron/shell/browser/api/electron_api_power_monitor.cc
@@ -118,6 +118,11 @@ void PowerMonitor::OnSpeedLimitChange(int speed_limit)
gin::DataObjectBuilder(isolate).Set("limit", speed_limit).Build());
}
+#if BUILDFLAG(IS_BSD)
+void PowerMonitor::SetListeningForShutdown(bool is_listening) {
+}
+#endif
+
#if BUILDFLAG(IS_LINUX)
void PowerMonitor::SetListeningForShutdown(bool is_listening) {
if (is_listening) {
@@ -143,7 +148,7 @@ gin::ObjectTemplateBuilder PowerMonitor::GetObjectTemp
auto builder =
gin_helper::EventEmitterMixin<PowerMonitor>::GetObjectTemplateBuilder(
isolate);
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
builder.SetMethod("setListeningForShutdown",
&PowerMonitor::SetListeningForShutdown);
#endif
|