only bind setAppUserModelId on windows

This commit is contained in:
Jeremy Rose 2021-03-24 10:55:32 -07:00
parent aaf03765ed
commit 640a145112
2 changed files with 4 additions and 0 deletions

View file

@ -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))

View file

@ -186,6 +186,7 @@ struct Converter<std::map<K, V>> {
}
};
#if defined(OS_WIN)
template <>
struct Converter<std::wstring> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
@ -207,6 +208,7 @@ struct Converter<std::wstring> {
}
}
};
#endif
} // namespace gin