Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / toolbar / bookmark_sub_menu_model.cc
blob21f4a1c535cd3a7cf9e74877517dad1e50942624
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/toolbar/bookmark_sub_menu_model.h"
7 #include "chrome/app/chrome_command_ids.h"
8 #include "grit/generated_resources.h"
10 // For views and cocoa, we have complex delegate systems to handle
11 // injecting the bookmarks to the bookmark submenu. This is done to support
12 // advanced interactions with the menu contents, like right click context menus.
13 // For the time being on GTK systems, we have a dedicated bookmark menu model in
14 // chrome/browser/ui/gtk/bookmarks/bookmark_sub_menu_model_gtk.cc instead.
16 // Note that although this file's header is included on GTK systems, this
17 // source file is not compiled there. (The header just includes the GTK one.)
19 BookmarkSubMenuModel::BookmarkSubMenuModel(
20 ui::SimpleMenuModel::Delegate* delegate, Browser* browser)
21 : SimpleMenuModel(delegate) {
22 Build(browser);
25 BookmarkSubMenuModel::~BookmarkSubMenuModel() {}
27 void BookmarkSubMenuModel::Build(Browser* browser) {
28 AddCheckItemWithStringId(IDC_SHOW_BOOKMARK_BAR, IDS_SHOW_BOOKMARK_BAR);
29 AddItemWithStringId(IDC_SHOW_BOOKMARK_MANAGER, IDS_BOOKMARK_MANAGER);
30 #if !defined(OS_CHROMEOS)
31 AddItemWithStringId(IDC_IMPORT_SETTINGS, IDS_IMPORT_SETTINGS_MENU_LABEL);
32 #endif
33 AddSeparator(ui::NORMAL_SEPARATOR);
35 AddItemWithStringId(IDC_BOOKMARK_PAGE, IDS_BOOKMARK_THIS_PAGE);
36 AddItemWithStringId(IDC_BOOKMARK_ALL_TABS, IDS_BOOKMARK_OPEN_PAGES);
38 AddItemWithStringId(IDC_PIN_TO_START_SCREEN, IDS_PIN_TO_START_SCREEN);
39 #if defined(OS_MACOSX)
40 AddSeparator(ui::NORMAL_SEPARATOR);
41 #endif