[Mac] Add API for dock, fixes #46.

This commit is contained in:
Cheng Zhao 2013-08-06 16:19:56 +08:00
parent 6e90430df5
commit b1f88d680b
5 changed files with 76 additions and 0 deletions

View file

@ -29,4 +29,17 @@ void Browser::CancelQuit() {
[[AtomApplication sharedApplication] replyToApplicationShouldTerminate:NO];
}
int Browser::DockBounce(BounceType type) {
return [[AtomApplication sharedApplication] requestUserAttention:type];
}
void Browser::DockCancelBounce(int rid) {
[[AtomApplication sharedApplication] cancelUserAttentionRequest:rid];
}
void Browser::DockSetBadgeText(const std::string& label) {
NSDockTile *tile = [[AtomApplication sharedApplication] dockTile];
[tile setBadgeLabel:base::SysUTF8ToNSString(label)];
}
} // namespace atom