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
|
@ -51,6 +51,13 @@ bool AtomMenuModel::ShouldRegisterAcceleratorAt(int index) const {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool AtomMenuModel::WorksWhenHiddenAt(int index) const {
|
||||
if (delegate_) {
|
||||
return delegate_->ShouldCommandIdWorkWhenHidden(GetCommandIdAt(index));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void AtomMenuModel::MenuWillClose() {
|
||||
ui::SimpleMenuModel::MenuWillClose();
|
||||
for (Observer& observer : observers_) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue