summaryrefslogtreecommitdiffstats
path: root/app/menus
diff options
context:
space:
mode:
Diffstat (limited to 'app/menus')
-rw-r--r--app/menus/simple_menu_model.h11
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);