| Index: views/controls/menu/native_menu_gtk.h
|
| diff --git a/views/controls/menu/native_menu_gtk.h b/views/controls/menu/native_menu_gtk.h
|
| index 768fada2f35b3c6fa91f873d51e7ded5c5d626dd..92c500dfdc061a764e71f2221da0ac3c4a61eedc 100644
|
| --- a/views/controls/menu/native_menu_gtk.h
|
| +++ b/views/controls/menu/native_menu_gtk.h
|
| @@ -33,10 +33,13 @@ class NativeMenuGtk : public MenuWrapper {
|
| void AddSeparatorAt(int index);
|
| void AddMenuItemAt(int index, GtkRadioMenuItem** last_radio_item);
|
|
|
| - static void UpdateStateCallback(GtkWidget* menu_item, gpointer data);
|
| -
|
| void ResetMenu();
|
|
|
| + // Updates the menu item's state.
|
| + void UpdateMenuItemState(GtkWidget* menu_item);
|
| +
|
| + static void UpdateStateCallback(GtkWidget* menu_item, gpointer data);
|
| +
|
| // Callback for gtk_menu_popup to position the menu.
|
| static void MenuPositionFunc(GtkMenu* menu, int* x, int* y, gboolean* push_in,
|
| void* data);
|
| @@ -53,6 +56,11 @@ class NativeMenuGtk : public MenuWrapper {
|
|
|
| bool menu_shown_;
|
|
|
| + // A flag used to avoid misfiring ActivateAt call on the menu model.
|
| + // This is necessary as GTK menu fires an activate signal even when the
|
| + // state is changed by |UpdateStates()| API.
|
| + bool suppress_activate_signal_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(NativeMenuGtk);
|
| };
|
|
|
|
|