2016-03-24 13:15:04 -07:00
|
|
|
const EventEmitter = require('events').EventEmitter
|
|
|
|
const Tray = process.atomBinding('tray').Tray
|
2016-01-11 18:40:23 -08:00
|
|
|
|
2016-03-28 17:51:11 -07:00
|
|
|
Object.setPrototypeOf(Tray.prototype, EventEmitter.prototype)
|
2016-01-11 18:40:23 -08:00
|
|
|
|
2016-03-24 13:15:04 -07:00
|
|
|
Tray.prototype.setContextMenu = function (menu) {
|
|
|
|
this._setContextMenu(menu)
|
2016-01-11 18:40:23 -08:00
|
|
|
|
2016-01-14 10:35:29 -08:00
|
|
|
// Keep a strong reference of menu.
|
2016-03-28 17:40:40 -07:00
|
|
|
this.menu = menu
|
2016-03-24 13:15:04 -07:00
|
|
|
}
|
2016-01-11 18:40:23 -08:00
|
|
|
|
2016-03-24 13:15:04 -07:00
|
|
|
module.exports = Tray
|