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

Unified Diff: app/menus/simple_menu_model.h

Issue 2879002: Reapply r50859 with chromeos fixes. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: add explicit menus:: to chromeos Created 10 years, 6 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 | « app/menus/menu_model.h ('k') | app/menus/simple_menu_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/menus/simple_menu_model.h
diff --git a/app/menus/simple_menu_model.h b/app/menus/simple_menu_model.h
index 8dd6c6489ca0d2ec8d073f5dbe5457a8ef66a56b..b6ae852b9838ad3912bcbfff582107c6a2334ad5 100644
--- a/app/menus/simple_menu_model.h
+++ b/app/menus/simple_menu_model.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/string16.h"
+#include "app/menus/button_menu_item_model.h"
#include "app/menus/menu_model.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -60,6 +61,10 @@ class SimpleMenuModel : public MenuModel {
void AddCheckItemWithStringId(int command_id, int string_id);
void AddRadioItem(int command_id, const string16& label, int group_id);
void AddRadioItemWithStringId(int command_id, int string_id, int group_id);
+
+ // These three methods take pointers to various sub-models. These models
+ // should be owned by the same owner of this SimpleMenuModel.
+ void AddButtonItem(int command_id, ButtonMenuItemModel* model);
void AddSubMenu(int command_id, const string16& label, MenuModel* model);
void AddSubMenuWithStringId(int command_id, int string_id, MenuModel* model);
@@ -102,6 +107,7 @@ class SimpleMenuModel : public MenuModel {
virtual bool IsItemCheckedAt(int index) const;
virtual int GetGroupIdAt(int index) const;
virtual bool GetIconAt(int index, SkBitmap* icon) const;
+ virtual menus::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const;
virtual bool IsEnabledAt(int index) const;
virtual void HighlightChangedTo(int index);
virtual void ActivatedAt(int index);
@@ -125,6 +131,7 @@ class SimpleMenuModel : public MenuModel {
ItemType type;
int group_id;
MenuModel* submenu;
+ ButtonMenuItemModel* button_model;
};
std::vector<Item> items_;
« no previous file with comments | « app/menus/menu_model.h ('k') | app/menus/simple_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698