Remove "async" option from menu.popup()

All menus are async now. See "Cleanup MenuRunner API"
https://codereview.chromium.org/2790773002
This commit is contained in:
Birunthan Mohanathas 2017-09-14 00:13:45 +03:00 committed by Cheng Zhao
parent 338604239d
commit 4e859b4718
7 changed files with 32 additions and 51 deletions

View file

@ -44,7 +44,6 @@ Menu.prototype._init = function () {
}
Menu.prototype.popup = function (window, x, y, positioningItem) {
let asyncPopup
let [newX, newY, newPosition, newWindow] = [x, y, positioningItem, window]
// menu.popup(x, y, positioningItem)
@ -61,7 +60,6 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
newX = opts.x
newY = opts.y
newPosition = opts.positioningItem
asyncPopup = opts.async
}
// set defaults
@ -69,9 +67,8 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
if (typeof y !== 'number') newY = -1
if (typeof positioningItem !== 'number') newPosition = -1
if (!window) newWindow = BrowserWindow.getFocusedWindow()
if (typeof asyncPopup !== 'boolean') asyncPopup = false
this.popupAt(newWindow, newX, newY, newPosition, asyncPopup)
this.popupAt(newWindow, newX, newY, newPosition)
}
Menu.prototype.closePopup = function (window) {