fix flash menu being unresponsive to commands
This commit is contained in:
parent
85ef42d99e
commit
c586806609
5 changed files with 19 additions and 3 deletions
|
@ -40,6 +40,7 @@ void Menu::AfterInit(v8::Isolate* isolate) {
|
|||
delegate.Get("getAcceleratorForCommandId", &get_accelerator_);
|
||||
delegate.Get("executeCommand", &execute_command_);
|
||||
delegate.Get("menuWillShow", &menu_will_show_);
|
||||
delegate.Get("menuClosed", &menu_closed_);
|
||||
}
|
||||
|
||||
bool Menu::IsCommandIdChecked(int command_id) const {
|
||||
|
@ -75,6 +76,10 @@ void Menu::MenuWillShow(ui::SimpleMenuModel* source) {
|
|||
menu_will_show_.Run();
|
||||
}
|
||||
|
||||
void Menu::MenuClosed(ui::SimpleMenuModel* source) {
|
||||
menu_closed_.Run();
|
||||
}
|
||||
|
||||
void Menu::InsertItemAt(
|
||||
int index, int command_id, const base::string16& label) {
|
||||
model_->InsertItemAt(index, command_id, label);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue