Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1168)

Unified Diff: ui/views/controls/menu/menu_model_adapter.h

Issue 23530070: backup for dynamic recent tabs submenu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new RecentTabsMenuModelDelegate w/ new intf Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_item_view.cc ('k') | ui/views/controls/menu/menu_model_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_model_adapter.h
diff --git a/ui/views/controls/menu/menu_model_adapter.h b/ui/views/controls/menu/menu_model_adapter.h
index 0c960a505b0fed8b54a7cf31ef5c4e551cb74422..4db9dbe2cf9ba3c52b97ee36113fa84f77340156 100644
--- a/ui/views/controls/menu/menu_model_adapter.h
+++ b/ui/views/controls/menu/menu_model_adapter.h
@@ -38,6 +38,21 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate {
}
int triggerable_event_flags() const { return triggerable_event_flags_; }
+ // Creates a menu item for the specified entry in the model and adds it as
+ // a child to |menu| at the specified |menu_index|.
+ static MenuItemView* AddMenuItemFromModelAt(ui::MenuModel* model,
+ int model_index,
+ MenuItemView* menu,
+ int menu_index,
+ int item_id);
+
+ // Creates a menu item for the specified entry in the model and appends it as
+ // a child to |menu|.
+ static MenuItemView* AppendMenuItemFromModel(ui::MenuModel* model,
+ int model_index,
+ MenuItemView* menu,
+ int item_id);
+
protected:
// Create and add a menu item to |menu| for the item at index |index| in
// |model|. Subclasses override this to allow custom items to be added to the
« no previous file with comments | « ui/views/controls/menu/menu_item_view.cc ('k') | ui/views/controls/menu/menu_model_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698