mac: Pass useDefaultAccelerator to getAcceleratorForCommandId
This commit is contained in:
parent
77cdc2c4a7
commit
6381f44f26
17 changed files with 102 additions and 76 deletions
|
@ -17,6 +17,19 @@ class AtomMenuModel : public ui::SimpleMenuModel {
|
|||
class Delegate : public ui::SimpleMenuModel::Delegate {
|
||||
public:
|
||||
virtual ~Delegate() {}
|
||||
|
||||
virtual bool GetAcceleratorForCommandIdWithParams(
|
||||
int command_id,
|
||||
bool use_default_accelerator,
|
||||
ui::Accelerator* accelerator) const = 0;
|
||||
|
||||
private:
|
||||
// ui::SimpleMenuModel::Delegate:
|
||||
bool GetAcceleratorForCommandId(int command_id,
|
||||
ui::Accelerator* accelerator) {
|
||||
return GetAcceleratorForCommandIdWithParams(
|
||||
command_id, true, accelerator);
|
||||
}
|
||||
};
|
||||
|
||||
class Observer {
|
||||
|
@ -35,6 +48,9 @@ class AtomMenuModel : public ui::SimpleMenuModel {
|
|||
|
||||
void SetRole(int index, const base::string16& role);
|
||||
base::string16 GetRoleAt(int index);
|
||||
bool GetAcceleratorAtWithParams(int index,
|
||||
bool use_default_accelerator,
|
||||
ui::Accelerator* accelerator) const;
|
||||
|
||||
// ui::SimpleMenuModel:
|
||||
void MenuClosed() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue