Implement libunity launcher badge counter to be set via electron, fixes #4193

This commit is contained in:
Jonas Schwabe 2016-06-26 01:55:24 +02:00
parent 90ea0a365c
commit b22ce93477
4 changed files with 41 additions and 1 deletions

View file

@ -614,6 +614,16 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
dict.SetMethod("dockSetMenu", &DockSetMenu);
dict.SetMethod("dockSetIcon", base::Bind(&Browser::DockSetIcon, browser));
#endif
#if defined(OS_LINUX)
auto browser = base::Unretained(Browser::Get());
dict.SetMethod("unityLauncherAvailable",
base::Bind(&Browser::UnityLauncherAvailable, browser));
dict.SetMethod("unityLauncherSetBadgeCount",
base::Bind(&Browser::UnityLauncherSetBadgeCount, browser));
dict.SetMethod("unityLauncherGetBadgeCount",
base::Bind(&Browser::UnityLauncherGetBadgeCount, browser));
#endif
}
} // namespace