feat: add tray.focus() (#19548)

This commit is contained in:
Milan Burda 2019-08-09 16:43:48 +02:00 committed by Shelley Vohr
parent ed3b69ffb1
commit 03debb4ef9
7 changed files with 28 additions and 0 deletions

View file

@ -221,6 +221,10 @@ void Tray::RemoveBalloon() {
tray_icon_->RemoveBalloon();
}
void Tray::Focus() {
tray_icon_->Focus();
}
void Tray::PopUpContextMenu(mate::Arguments* args) {
mate::Handle<Menu> menu;
args->GetNext(&menu);
@ -255,6 +259,7 @@ void Tray::BuildPrototype(v8::Isolate* isolate,
&Tray::GetIgnoreDoubleClickEvents)
.SetMethod("displayBalloon", &Tray::DisplayBalloon)
.SetMethod("removeBalloon", &Tray::RemoveBalloon)
.SetMethod("focus", &Tray::Focus)
.SetMethod("popUpContextMenu", &Tray::PopUpContextMenu)
.SetMethod("setContextMenu", &Tray::SetContextMenu)
.SetMethod("getBounds", &Tray::GetBounds);