add toolTip property for MenuItem (#19099)
This commit is contained in:
parent
692df804cf
commit
06d48514c6
8 changed files with 41 additions and 3 deletions
|
@ -53,6 +53,8 @@ class AtomMenuModel : public ui::SimpleMenuModel {
|
|||
void AddObserver(Observer* obs) { observers_.AddObserver(obs); }
|
||||
void RemoveObserver(Observer* obs) { observers_.RemoveObserver(obs); }
|
||||
|
||||
void SetToolTip(int index, const base::string16& toolTip);
|
||||
base::string16 GetToolTipAt(int index);
|
||||
void SetRole(int index, const base::string16& role);
|
||||
base::string16 GetRoleAt(int index);
|
||||
bool GetAcceleratorAtWithParams(int index,
|
||||
|
@ -71,7 +73,8 @@ class AtomMenuModel : public ui::SimpleMenuModel {
|
|||
private:
|
||||
Delegate* delegate_; // weak ref.
|
||||
|
||||
std::map<int, base::string16> roles_; // command id -> role
|
||||
std::map<int, base::string16> toolTips_; // command id -> tooltip
|
||||
std::map<int, base::string16> roles_; // command id -> role
|
||||
base::ObserverList<Observer> observers_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomMenuModel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue