summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-06 00:16:40 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-06 00:16:40 +0000
commita3354454938083e933e2c988777a1c53d94b4277 (patch)
tree5cbfca015873e7c56eccefe80d1a979e500b33cb /views
parent50a376f0d18e4f76a3ab04c46c66df965b6b2192 (diff)
downloadchromium_src-a3354454938083e933e2c988777a1c53d94b4277.zip
chromium_src-a3354454938083e933e2c988777a1c53d94b4277.tar.gz
chromium_src-a3354454938083e933e2c988777a1c53d94b4277.tar.bz2
Rebuild app menu in ToolbarView::RunAppMenu
When "enable-udd-profiles" switch is set, update profile submenu and rebuild app menu if necessary. BUG=30417 TEST=Verify that comment 5 in issue 30417 is fixed. Review URL: http://codereview.chromium.org/571015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/menu/native_menu_win.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/views/controls/menu/native_menu_win.cc b/views/controls/menu/native_menu_win.cc
index 9553b73..630c7bb 100644
--- a/views/controls/menu/native_menu_win.cc
+++ b/views/controls/menu/native_menu_win.cc
@@ -1,6 +1,6 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#include "views/controls/menu/native_menu_win.h"
@@ -334,6 +334,8 @@ void NativeMenuWin::CancelMenu() {
void NativeMenuWin::Rebuild() {
ResetNativeMenu();
+ items_.clear();
+
owner_draw_ = model_->HasIcons() || owner_draw_;
first_item_index_ = model_->GetFirstItemIndex(GetNativeMenu());
for (int menu_index = first_item_index_;