summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/menu_gtk.h
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 23:58:08 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 23:58:08 +0000
commit841b5d18b22145d0127cf72123b54c91a76fd64f (patch)
tree8712b530fa7349585a34a4bb58285cff6766cb2f /chrome/browser/gtk/menu_gtk.h
parent8ab9ba5454bbd0bf079c1af4e3c8a5f30d058e0c (diff)
downloadchromium_src-841b5d18b22145d0127cf72123b54c91a76fd64f.zip
chromium_src-841b5d18b22145d0127cf72123b54c91a76fd64f.tar.gz
chromium_src-841b5d18b22145d0127cf72123b54c91a76fd64f.tar.bz2
Simplify TabGtk::ContextMenuController by adding methods to dynamically build a MenuGtk and use them.
Review URL: http://codereview.chromium.org/68013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/menu_gtk.h')
-rw-r--r--chrome/browser/gtk/menu_gtk.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/gtk/menu_gtk.h b/chrome/browser/gtk/menu_gtk.h
index d3bd65d..9b9a724 100644
--- a/chrome/browser/gtk/menu_gtk.h
+++ b/chrome/browser/gtk/menu_gtk.h
@@ -41,11 +41,15 @@ class MenuGtk {
// to create the menu.
MenuGtk(MenuGtk::Delegate* delegate, const MenuCreateMaterial* menu_data,
GtkAccelGroup* accel_group);
- // Builds a MenuGtk that uses |delegate| to create the menu as well as perform
- // actions.
- explicit MenuGtk(MenuGtk::Delegate* delegate);
+ // Creates a MenuGtk that uses |delegate| to perform actions. Builds the
+ // menu using |delegate| if |load| is true.
+ MenuGtk(MenuGtk::Delegate* delegate, bool load);
~MenuGtk();
+ // These methods are used to build the menu dynamically.
+ void AppendMenuItemWithLabel(int command_id, const std::string& label);
+ void AppendSeparator();
+
// Displays the menu. |timestamp| is the time of activation. The popup is
// statically positioned at |widget|.
void Popup(GtkWidget* widget, gint button_type, guint32 timestamp);