| Index: ui/views/controls/menu/menu_model_adapter.cc
|
| diff --git a/ui/views/controls/menu/menu_model_adapter.cc b/ui/views/controls/menu/menu_model_adapter.cc
|
| index 18c426996eb7cd2304c81e90cbeb471f63faf56b..55c5d7d21d9d16a450caeb49fddcdd8bd10ca3ae 100644
|
| --- a/ui/views/controls/menu/menu_model_adapter.cc
|
| +++ b/ui/views/controls/menu/menu_model_adapter.cc
|
| @@ -205,6 +205,16 @@ bool MenuModelAdapter::IsCommandEnabled(int id) const {
|
| return false;
|
| }
|
|
|
| +bool MenuModelAdapter::IsCommandVisible(int id) const {
|
| + ui::MenuModel* model = menu_model_;
|
| + int index = 0;
|
| + if (ui::MenuModel::GetModelAndIndexForCommandId(id, &model, &index))
|
| + return model->IsVisibleAt(index);
|
| +
|
| + NOTREACHED();
|
| + return false;
|
| +}
|
| +
|
| bool MenuModelAdapter::IsItemChecked(int id) const {
|
| ui::MenuModel* model = menu_model_;
|
| int index = 0;
|
| @@ -265,9 +275,6 @@ void MenuModelAdapter::BuildMenuImpl(MenuItemView* menu, ui::MenuModel* model) {
|
| for (int i = 0; i < item_count; ++i) {
|
| MenuItemView* item = AppendMenuItem(menu, model, i);
|
|
|
| - if (item)
|
| - item->SetVisible(model->IsVisibleAt(i));
|
| -
|
| if (model->GetTypeAt(i) == ui::MenuModel::TYPE_SUBMENU) {
|
| DCHECK(item);
|
| DCHECK_EQ(MenuItemView::SUBMENU, item->GetType());
|
|
|