mac: Implement app.setBadgeCount

This commit is contained in:
Cheng Zhao 2016-07-01 17:39:01 +09:00
parent 36a0a491c9
commit cb00d3cfb3
7 changed files with 37 additions and 60 deletions

View file

@ -47,6 +47,11 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol) {
return false;
}
void Browser::SetBadgeCount(int count) {
current_badge_count_ = count;
unity::SetDownloadCount(count);
}
std::string Browser::GetExecutableFileVersion() const {
return brightray::GetApplicationVersion();
}
@ -55,19 +60,8 @@ std::string Browser::GetExecutableFileProductName() const {
return brightray::GetApplicationName();
}
bool Browser::UnityLauncherAvailable() {
bool Browser::IsUnityRunning() {
return unity::IsRunning();
}
void Browser::UnityLauncherSetBadgeCount(int count) {
if (UnityLauncherAvailable()) {
current_badge_count_ = count;
unity::SetDownloadCount(count);
}
}
int Browser::UnityLauncherGetBadgeCount() {
return current_badge_count_;
}
} // namespace atom