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

Side by Side Diff: ui/base/models/simple_menu_model.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, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/models/menu_model_delegate.h ('k') | ui/base/models/simple_menu_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_ 5 #ifndef UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_
6 #define UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_ 6 #define UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 int group_id); 114 int group_id);
115 void InsertRadioItemWithStringIdAt( 115 void InsertRadioItemWithStringIdAt(
116 int index, int command_id, int string_id, int group_id); 116 int index, int command_id, int string_id, int group_id);
117 void InsertSubMenuAt(int index, 117 void InsertSubMenuAt(int index,
118 int command_id, 118 int command_id,
119 const base::string16& label, 119 const base::string16& label,
120 MenuModel* model); 120 MenuModel* model);
121 void InsertSubMenuWithStringIdAt( 121 void InsertSubMenuWithStringIdAt(
122 int index, int command_id, int string_id, MenuModel* model); 122 int index, int command_id, int string_id, MenuModel* model);
123 123
124 // Remove item at specified index from the model.
125 void RemoveItemAt(int index);
126
124 // Sets the icon for the item at |index|. 127 // Sets the icon for the item at |index|.
125 void SetIcon(int index, const gfx::Image& icon); 128 void SetIcon(int index, const gfx::Image& icon);
126 129
127 // Sets the sublabel for the item at |index|. 130 // Sets the sublabel for the item at |index|.
128 void SetSublabel(int index, const base::string16& sublabel); 131 void SetSublabel(int index, const base::string16& sublabel);
129 132
130 // Sets the minor text for the item at |index|. 133 // Sets the minor text for the item at |index|.
131 void SetMinorText(int index, const base::string16& minor_text); 134 void SetMinorText(int index, const base::string16& minor_text);
132 135
133 // Clears all items. Note that it does not free MenuModel of submenu. 136 // Clears all items. Note that it does not free MenuModel of submenu.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 MenuModelDelegate* menu_model_delegate_; 200 MenuModelDelegate* menu_model_delegate_;
198 201
199 base::WeakPtrFactory<SimpleMenuModel> method_factory_; 202 base::WeakPtrFactory<SimpleMenuModel> method_factory_;
200 203
201 DISALLOW_COPY_AND_ASSIGN(SimpleMenuModel); 204 DISALLOW_COPY_AND_ASSIGN(SimpleMenuModel);
202 }; 205 };
203 206
204 } // namespace ui 207 } // namespace ui
205 208
206 #endif // UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_ 209 #endif // UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « ui/base/models/menu_model_delegate.h ('k') | ui/base/models/simple_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698