diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-06 00:16:40 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-06 00:16:40 +0000 |
commit | a3354454938083e933e2c988777a1c53d94b4277 (patch) | |
tree | 5cbfca015873e7c56eccefe80d1a979e500b33cb /app/menus | |
parent | 50a376f0d18e4f76a3ab04c46c66df965b6b2192 (diff) | |
download | chromium_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 'app/menus')
-rw-r--r-- | app/menus/simple_menu_model.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/menus/simple_menu_model.h b/app/menus/simple_menu_model.h index 882e227..59e741e 100644 --- a/app/menus/simple_menu_model.h +++ b/app/menus/simple_menu_model.h @@ -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. #ifndef APP_MENUS_SIMPLE_MENU_MODEL_H_ #define APP_MENUS_SIMPLE_MENU_MODEL_H_ @@ -75,6 +75,11 @@ class SimpleMenuModel : public MenuModel { void InsertSubMenuAt(int index, const string16& label, MenuModel* model); void InsertSubMenuWithStringIdAt(int index, int string_id, MenuModel* model); + // Clears all items. Note that it does not free MenuModel of submenu. + void Clear() { + items_.clear(); + } + // Returns the index of the item that has the given |command_id|. Returns // -1 if not found. int GetIndexOfCommandId(int command_id); |