From 640a1451126b404a6a9557c6c080cc83d51805de Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 24 Mar 2021 10:55:32 -0700 Subject: [PATCH] only bind setAppUserModelId on windows --- shell/browser/api/electron_api_app.cc | 2 ++ shell/common/gin_converters/std_converter.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 0bbd531f51a3..7790c5769185 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -1553,8 +1553,10 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuilder(v8::Isolate* isolate) { base::BindRepeating(&Browser::AddRecentDocument, browser)) .SetMethod("clearRecentDocuments", base::BindRepeating(&Browser::ClearRecentDocuments, browser)) +#if defined(OS_WIN) .SetMethod("setAppUserModelId", base::BindRepeating(&Browser::SetAppUserModelID, browser)) +#endif .SetMethod( "isDefaultProtocolClient", base::BindRepeating(&Browser::IsDefaultProtocolClient, browser)) diff --git a/shell/common/gin_converters/std_converter.h b/shell/common/gin_converters/std_converter.h index 977c8b3794bf..fef3cd26fa67 100644 --- a/shell/common/gin_converters/std_converter.h +++ b/shell/common/gin_converters/std_converter.h @@ -186,6 +186,7 @@ struct Converter> { } }; +#if defined(OS_WIN) template <> struct Converter { static v8::Local ToV8(v8::Isolate* isolate, @@ -207,6 +208,7 @@ struct Converter { } } }; +#endif } // namespace gin