| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #ifndef VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_ |
| 6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_ | 6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "views/controls/menu/menu_wrapper.h" | 10 #include "views/controls/menu/menu_wrapper.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 GtkWidget* menu_; | 57 GtkWidget* menu_; |
| 58 | 58 |
| 59 bool menu_shown_; | 59 bool menu_shown_; |
| 60 | 60 |
| 61 // A flag used to avoid misfiring ActivateAt call on the menu model. | 61 // A flag used to avoid misfiring ActivateAt call on the menu model. |
| 62 // This is necessary as GTK menu fires an activate signal even when the | 62 // This is necessary as GTK menu fires an activate signal even when the |
| 63 // state is changed by |UpdateStates()| API. | 63 // state is changed by |UpdateStates()| API. |
| 64 bool suppress_activate_signal_; | 64 bool suppress_activate_signal_; |
| 65 | 65 |
| 66 // Did the user select something from the menu? |
| 67 bool menu_activated_; |
| 68 |
| 69 // If menu_activated_ is true, this is the index of the item. |
| 70 int activated_index_; |
| 71 |
| 66 DISALLOW_COPY_AND_ASSIGN(NativeMenuGtk); | 72 DISALLOW_COPY_AND_ASSIGN(NativeMenuGtk); |
| 67 }; | 73 }; |
| 68 | 74 |
| 69 } // namespace views | 75 } // namespace views |
| 70 | 76 |
| 71 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_ | 77 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_ |
| OLD | NEW |