Revert the CefMenuModel separator changes added in revision 747.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@749 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-08-29 16:58:40 +00:00
parent 2e83d58814
commit e99d9c86a6
10 changed files with 26 additions and 130 deletions

View File

@ -167,7 +167,6 @@ struct CefMenuModelImpl::Item {
const CefString& label,
int group_id)
: type_(type),
separator_type_(MENUSEPARATORTYPE_NONE),
command_id_(command_id),
label_(label),
group_id_(group_id),
@ -183,7 +182,6 @@ struct CefMenuModelImpl::Item {
// Basic information.
cef_menu_item_type_t type_;
cef_menu_separator_type_t separator_type_;
int command_id_;
CefString label_;
int group_id_;
@ -227,17 +225,11 @@ int CefMenuModelImpl::GetCount() {
return static_cast<int>(items_.size());
}
bool CefMenuModelImpl::AddSeparator(MenuSeparatorType type) {
bool CefMenuModelImpl::AddSeparator() {
if (!VerifyContext())
return false;
DCHECK(type != MENUSEPARATORTYPE_NONE);
if (type == MENUSEPARATORTYPE_NONE)
return false;
Item item(MENUITEMTYPE_SEPARATOR, kSeparatorId, CefString(), -1);
item.separator_type_ = type;
AppendItem(item);
AppendItem(Item(MENUITEMTYPE_SEPARATOR, kSeparatorId, CefString(), -1));
return true;
}
@ -277,17 +269,12 @@ CefRefPtr<CefMenuModel> CefMenuModelImpl::AddSubMenu(int command_id,
return item.submenu_.get();
}
bool CefMenuModelImpl::InsertSeparatorAt(int index, MenuSeparatorType type) {
bool CefMenuModelImpl::InsertSeparatorAt(int index) {
if (!VerifyContext())
return false;
DCHECK(type != MENUSEPARATORTYPE_NONE);
if (type == MENUSEPARATORTYPE_NONE)
return false;
Item item(MENUITEMTYPE_SEPARATOR, kSeparatorId, CefString(), -1);
item.separator_type_ = type;
InsertItemAt(item, index);
InsertItemAt(Item(MENUITEMTYPE_SEPARATOR, kSeparatorId, CefString(), -1),
index);
return true;
}
@ -417,16 +404,6 @@ CefMenuModelImpl::MenuItemType CefMenuModelImpl::GetTypeAt(int index) {
return MENUITEMTYPE_NONE;
}
CefMenuModelImpl::MenuSeparatorType
CefMenuModelImpl::GetSeparatorTypeAt(int index) {
if (!VerifyContext())
return MENUSEPARATORTYPE_NONE;
if (index >= 0 && index < static_cast<int>(items_.size()))
return items_[index].separator_type_;
return MENUSEPARATORTYPE_NONE;
}
int CefMenuModelImpl::GetGroupId(int command_id) {
return GetGroupIdAt(GetIndexOf(command_id));
}