feat: add registerAccelerator flag to allow menu items to optionally skip accelerator registration (#15723)

* feat: add registerAccelerator flag to allow menu items to skip registration

* docs: add docs for registerAccelerator

* docs: re-add accidentally removed line
This commit is contained in:
Heilig Benedek 2018-11-26 19:43:55 +01:00 committed by Jeremy Apthorp
parent 3748ee49ea
commit 0242818f39
9 changed files with 43 additions and 7 deletions

View file

@ -23,6 +23,9 @@ class AtomMenuModel : public ui::SimpleMenuModel {
bool use_default_accelerator,
ui::Accelerator* accelerator) const = 0;
virtual bool ShouldRegisterAcceleratorForCommandId(
int command_id) const = 0;
private:
// ui::SimpleMenuModel::Delegate:
bool GetAcceleratorForCommandId(
@ -52,6 +55,7 @@ class AtomMenuModel : public ui::SimpleMenuModel {
bool GetAcceleratorAtWithParams(int index,
bool use_default_accelerator,
ui::Accelerator* accelerator) const;
bool ShouldRegisterAcceleratorAt(int index) const;
// ui::SimpleMenuModel:
void MenuWillClose() override;