Add callback parameter to Menu.popup
This commit is contained in:
parent
2e3d940749
commit
7b01a8b860
6 changed files with 31 additions and 16 deletions
|
@ -21,11 +21,12 @@ class MenuViews : public Menu {
|
|||
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
|
||||
|
||||
protected:
|
||||
void PopupAt(Window* window, int x, int y, int positioning_item) override;
|
||||
void PopupAt(Window* window, int x, int y, int positioning_item,
|
||||
const base::Closure& callback) override;
|
||||
void ClosePopupAt(int32_t window_id) override;
|
||||
|
||||
private:
|
||||
void OnClosed(int32_t window_id);
|
||||
void OnClosed(int32_t window_id, const base::Closure& callback);
|
||||
|
||||
// window ID -> open context menu
|
||||
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue