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

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

Issue 122027: Remove the Menu object, converting all the remaining callers to use Menu2. I'... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | « views/controls/menu/menu_2.cc ('k') | views/controls/textfield/native_textfield_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/native_menu_win.cc
===================================================================
--- views/controls/menu/native_menu_win.cc (revision 18306)
+++ views/controls/menu/native_menu_win.cc (working copy)
@@ -63,7 +63,7 @@
NativeMenuWin* GetNativeMenuWinFromHMENU(HMENU hmenu) const {
MENUINFO mi = {0};
mi.cbSize = sizeof(mi);
- mi.fMask = MIM_MENUDATA;
+ mi.fMask = MIM_MENUDATA | MIM_STYLE;
GetMenuInfo(hmenu, &mi);
return reinterpret_cast<NativeMenuWin*>(mi.dwMenuData);
}
@@ -92,7 +92,9 @@
// Called when the user selects a specific item.
void OnMenuCommand(int position, HMENU menu) {
- GetNativeMenuWinFromHMENU(menu)->model_->ActivatedAt(position);
+ NativeMenuWin* intergoat = GetNativeMenuWinFromHMENU(menu);
+ Menu2Model* model = intergoat->model_;
+ model->ActivatedAt(position);
}
// Called as the user moves their mouse or arrows through the contents of the
@@ -165,6 +167,7 @@
NativeMenuWin::~NativeMenuWin() {
STLDeleteContainerPointers(items_.begin(), items_.end());
+ DestroyMenu(menu_);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « views/controls/menu/menu_2.cc ('k') | views/controls/textfield/native_textfield_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698