fix flash menu being unresponsive to commands

This commit is contained in:
Heilig Benedek 2017-11-27 00:24:25 +01:00 committed by Cheng Zhao
parent 85ef42d99e
commit c586806609
5 changed files with 19 additions and 3 deletions

View file

@ -52,6 +52,7 @@ class Menu : public mate::TrackableObject<Menu>,
ui::Accelerator* accelerator) const override;
void ExecuteCommand(int command_id, int event_flags) override;
void MenuWillShow(ui::SimpleMenuModel* source) override;
void MenuClosed(ui::SimpleMenuModel* source) override;
virtual void PopupAt(Window* window, int x, int y, int positioning_item) = 0;
virtual void ClosePopupAt(int32_t window_id) = 0;
@ -93,6 +94,7 @@ class Menu : public mate::TrackableObject<Menu>,
base::Callback<v8::Local<v8::Value>(int, bool)> get_accelerator_;
base::Callback<void(v8::Local<v8::Value>, int)> execute_command_;
base::Callback<void()> menu_will_show_;
base::Callback<void()> menu_closed_;
DISALLOW_COPY_AND_ASSIGN(Menu);
};