feat: add tray.focus() (#19548)
This commit is contained in:
parent
ed3b69ffb1
commit
03debb4ef9
7 changed files with 28 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -74,6 +74,7 @@ class Tray : public mate::TrackableObject<Tray>, public TrayIconObserver {
|
|||
bool GetIgnoreDoubleClickEvents();
|
||||
void DisplayBalloon(mate::Arguments* args, const mate::Dictionary& options);
|
||||
void RemoveBalloon();
|
||||
void Focus();
|
||||
void PopUpContextMenu(mate::Arguments* args);
|
||||
void SetContextMenu(v8::Isolate* isolate, mate::Handle<Menu> menu);
|
||||
gfx::Rect GetBounds();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue