| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_GTK_MENU_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_MENU_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_MENU_GTK_H_ | 6 #define CHROME_BROWSER_GTK_MENU_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 MenuGtk::Delegate* delegate_; | 130 MenuGtk::Delegate* delegate_; |
| 131 | 131 |
| 132 // For some menu items, we want to show the accelerator, but not actually | 132 // For some menu items, we want to show the accelerator, but not actually |
| 133 // explicitly handle it. To this end we connect those menu items' accelerators | 133 // explicitly handle it. To this end we connect those menu items' accelerators |
| 134 // to this group, but don't attach this group to any top level window. | 134 // to this group, but don't attach this group to any top level window. |
| 135 GtkAccelGroup* dummy_accel_group_; | 135 GtkAccelGroup* dummy_accel_group_; |
| 136 | 136 |
| 137 // gtk_menu_popup() does not appear to take ownership of popup menus, so | 137 // gtk_menu_popup() does not appear to take ownership of popup menus, so |
| 138 // MenuGtk explicitly manages the lifetime of the menu. | 138 // MenuGtk explicitly manages the lifetime of the menu. |
| 139 OwnedWidgetGtk menu_; | 139 OwnedWidgetGtk menu_; |
| 140 |
| 141 // True when we should ignore "activate" signals. Used to prevent |
| 142 // menu items from getting activated when we are setting up the |
| 143 // menu. |
| 144 static bool block_activation_; |
| 140 }; | 145 }; |
| 141 | 146 |
| 142 #endif // CHROME_BROWSER_GTK_MENU_GTK_H_ | 147 #endif // CHROME_BROWSER_GTK_MENU_GTK_H_ |
| OLD | NEW |