Add API: app.dock.downloadFinished(filePath)

This commit is contained in:
Daniel Pham 2016-05-10 15:02:56 -04:00
parent 4841e37502
commit 6dae07b76f
5 changed files with 18 additions and 0 deletions

View file

@ -134,6 +134,12 @@ void Browser::DockSetBadgeText(const std::string& label) {
[tile setBadgeLabel:base::SysUTF8ToNSString(label)];
}
void Browser::DockDownloadFinished(const std::string& filePath) {
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName: @"com.apple.DownloadFileFinished"
object: base::SysUTF8ToNSString(filePath)];
}
std::string Browser::DockGetBadgeText() {
NSDockTile *tile = [[AtomApplication sharedApplication] dockTile];
return base::SysNSStringToUTF8([tile badgeLabel]);