protected:
explicit MenuMac(v8::Isolate* isolate);
- void PopupAt(Window* window, int x, int y, int positioning_item = 0) override;
+ void PopupAt(Window* window, int x, int y, int positioning_item) override;
base::scoped_nsobject<AtomMenuController> menu_controller_;
explicit MenuViews(v8::Isolate* isolate);
protected:
- void PopupAt(Window* window, int x, int y, int positioning_item = 0) override;
+ void PopupAt(Window* window, int x, int y, int positioning_item) override;
private:
DISALLOW_COPY_AND_ASSIGN(MenuViews);
window = BrowserWindow.getFocusedWindow()
}
- // Default parameters.
+ // Default to showing under mouse location.
if (typeof x !== 'number') x = -1
if (typeof y !== 'number') y = -1
- if (typeof positioningItem !== 'number') positioningItem = 0
+
+ // Default to not highlighting any item.
+ if (typeof positioningItem !== 'number') positioningItem = -1
this.popupAt(window, x, y, positioningItem)
}