This source file includes following definitions.
- Build
#include "chrome/browser/ui/toolbar/bookmark_sub_menu_model.h"
#include "chrome/app/chrome_command_ids.h"
#include "grit/generated_resources.h"
BookmarkSubMenuModel::BookmarkSubMenuModel(
ui::SimpleMenuModel::Delegate* delegate, Browser* browser)
: SimpleMenuModel(delegate) {
Build(browser);
}
BookmarkSubMenuModel::~BookmarkSubMenuModel() {}
void BookmarkSubMenuModel::Build(Browser* browser) {
AddCheckItemWithStringId(IDC_SHOW_BOOKMARK_BAR, IDS_SHOW_BOOKMARK_BAR);
AddItemWithStringId(IDC_SHOW_BOOKMARK_MANAGER, IDS_BOOKMARK_MANAGER);
#if !defined(OS_CHROMEOS)
AddItemWithStringId(IDC_IMPORT_SETTINGS, IDS_IMPORT_SETTINGS_MENU_LABEL);
#endif
if (delegate()->IsCommandIdVisible(IDC_BOOKMARK_PAGE) ||
delegate()->IsCommandIdVisible(IDC_BOOKMARK_ALL_TABS) ||
delegate()->IsCommandIdVisible(IDC_PIN_TO_START_SCREEN)) {
AddSeparator(ui::NORMAL_SEPARATOR);
AddItemWithStringId(IDC_BOOKMARK_PAGE, IDS_BOOKMARK_THIS_PAGE);
AddItemWithStringId(IDC_BOOKMARK_ALL_TABS, IDS_BOOKMARK_OPEN_PAGES);
AddItemWithStringId(IDC_PIN_TO_START_SCREEN, IDS_PIN_TO_START_SCREEN);
}
#if defined(OS_MACOSX)
AddSeparator(ui::NORMAL_SEPARATOR);
#endif
}