win: Update states when setting checked property.

This commit is contained in:
Cheng Zhao 2014-05-26 11:34:36 +08:00
parent 6ee437e9bf
commit dfa1ae1c20
8 changed files with 50 additions and 9 deletions

View file

@ -54,6 +54,7 @@ class Menu : public mate::Wrappable,
virtual void Popup(Window* window) = 0;
scoped_ptr<ui::SimpleMenuModel> model_;
Menu* parent_;
private:
void InsertItemAt(int index, int command_id, const base::string16& label);
@ -80,8 +81,12 @@ class Menu : public mate::Wrappable,
bool IsEnabledAt(int index) const;
bool IsVisibleAt(int index) const;
#if defined(OS_WIN)
virtual void UpdateStates() = 0;
#endif
#if defined(OS_WIN) || defined(TOOLKIT_GTK)
void AttachToWindow(Window* window);
virtual void AttachToWindow(Window* window) = 0;
#endif
DISALLOW_COPY_AND_ASSIGN(Menu);