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

Unified Diff: chrome/views/controls/menu/menu.cc

Issue 100054: Added Undo close window to menu. Standardized capitalization for ... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 8 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 | « chrome/views/controls/menu/menu.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/controls/menu/menu.cc
===================================================================
--- chrome/views/controls/menu/menu.cc (revision 14849)
+++ chrome/views/controls/menu/menu.cc (working copy)
@@ -450,6 +450,15 @@
EnableMenuItem(menu_, index, MF_BYPOSITION | enable_flags);
}
+void Menu::SetMenuLabel(int item_id, const std::wstring& label) {
+ MENUITEMINFO mii = {0};
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_STRING;
+ mii.dwTypeData = const_cast<wchar_t*>(label.c_str());
+ mii.cch = static_cast<UINT>(label.size());
+ SetMenuItemInfo(menu_, item_id, false, &mii);
+}
+
DWORD Menu::GetTPMAlignFlags() const {
// The manner in which we handle the menu alignment depends on whether or not
// the menu is displayed within a mirrored view. If the UI is mirrored, the
« no previous file with comments | « chrome/views/controls/menu/menu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698