Merge pull request #5477 from danhp/download-bounce
Add API: app.dock.downloadFinished(filePath)
This commit is contained in:
commit
ed70a11ff8
5 changed files with 18 additions and 0 deletions
|
@ -158,6 +158,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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue