diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-12 20:44:28 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-12 20:44:28 +0000 |
commit | cdb4266b62202b44eb1fb36877398c2cb5504917 (patch) | |
tree | 60f5de9c0460d67cd7150ba5f2e33499892c38b2 /views/controls/menu/native_menu_win.cc | |
parent | f148ed7a47e14416efd1cc2666ea331fbcf5aa42 (diff) | |
download | chromium_src-cdb4266b62202b44eb1fb36877398c2cb5504917.zip chromium_src-cdb4266b62202b44eb1fb36877398c2cb5504917.tar.gz chromium_src-cdb4266b62202b44eb1fb36877398c2cb5504917.tar.bz2 |
Remove the Menu object, converting all the remaining callers to use Menu2. I'll rename Menu2->Menu afterwards.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/122027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18315 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/menu/native_menu_win.cc')
-rw-r--r-- | views/controls/menu/native_menu_win.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/views/controls/menu/native_menu_win.cc b/views/controls/menu/native_menu_win.cc index c82844e..c5f8331 100644 --- a/views/controls/menu/native_menu_win.cc +++ b/views/controls/menu/native_menu_win.cc @@ -63,7 +63,7 @@ class NativeMenuWin::MenuHostWindow { 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 @@ class NativeMenuWin::MenuHostWindow { // 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(Menu2Model* model, HWND system_menu_for) NativeMenuWin::~NativeMenuWin() { STLDeleteContainerPointers(items_.begin(), items_.end()); + DestroyMenu(menu_); } //////////////////////////////////////////////////////////////////////////////// |