mac: Use AsNSImage instead of ToNSImage
It can get rid of the empty check.
This commit is contained in:
parent
509ce0d5cb
commit
443a4b8f2f
1 changed files with 2 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue