feat: allow MenuItems to work optionally when hidden (#16853)
* feat: allow MenuItems to work optionally when hidden * fix: actually include forward_declaration
This commit is contained in:
parent
6d55498cc7
commit
544d8a423c
9 changed files with 44 additions and 2 deletions
|
@ -27,6 +27,8 @@ class AtomMenuModel : public ui::SimpleMenuModel {
|
|||
virtual bool ShouldRegisterAcceleratorForCommandId(
|
||||
int command_id) const = 0;
|
||||
|
||||
virtual bool ShouldCommandIdWorkWhenHidden(int command_id) const = 0;
|
||||
|
||||
private:
|
||||
// ui::SimpleMenuModel::Delegate:
|
||||
bool GetAcceleratorForCommandId(
|
||||
|
@ -57,6 +59,7 @@ class AtomMenuModel : public ui::SimpleMenuModel {
|
|||
bool use_default_accelerator,
|
||||
ui::Accelerator* accelerator) const;
|
||||
bool ShouldRegisterAcceleratorAt(int index) const;
|
||||
bool WorksWhenHiddenAt(int index) const;
|
||||
|
||||
// ui::SimpleMenuModel:
|
||||
void MenuWillClose() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue