mac: Use AsNSImage instead of ToNSImage

It can get rid of the empty check.
This commit is contained in:
Cheng Zhao 2015-02-12 12:29:21 +08:00
parent 509ce0d5cb
commit 443a4b8f2f

View file

@ -54,13 +54,11 @@ TrayIconCocoa::~TrayIconCocoa() {
}
void TrayIconCocoa::SetImage(const gfx::Image& image) {
if (!image.IsEmpty())
[item_ setImage:image.ToNSImage()];
[item_ setImage:image.AsNSImage()];
}
void TrayIconCocoa::SetPressedImage(const gfx::Image& image) {
if (!image.IsEmpty())
[item_ setAlternateImage:image.ToNSImage()];
[item_ setAlternateImage:image.AsNSImage()];
}
void TrayIconCocoa::SetToolTip(const std::string& tool_tip) {