OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/bookmarks/bookmark_context_menu_controller.h" | 5 #include "chrome/browser/bookmarks/bookmark_context_menu_controller.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/bookmarks/bookmark_editor.h" | 9 #include "chrome/browser/bookmarks/bookmark_editor.h" |
10 #include "chrome/browser/bookmarks/bookmark_folder_editor_controller.h" | 10 #include "chrome/browser/bookmarks/bookmark_folder_editor_controller.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 AddSeparator(); | 79 AddSeparator(); |
80 AddItem(IDC_BOOKMARK_BAR_REMOVE, IDS_BOOKMARK_BAR_REMOVE); | 80 AddItem(IDC_BOOKMARK_BAR_REMOVE, IDS_BOOKMARK_BAR_REMOVE); |
81 | 81 |
82 AddSeparator(); | 82 AddSeparator(); |
83 AddItem(IDC_BOOKMARK_BAR_ADD_NEW_BOOKMARK, IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK); | 83 AddItem(IDC_BOOKMARK_BAR_ADD_NEW_BOOKMARK, IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK); |
84 AddItem(IDC_BOOKMARK_BAR_NEW_FOLDER, IDS_BOOMARK_BAR_NEW_FOLDER); | 84 AddItem(IDC_BOOKMARK_BAR_NEW_FOLDER, IDS_BOOMARK_BAR_NEW_FOLDER); |
85 | 85 |
86 AddSeparator(); | 86 AddSeparator(); |
87 AddItem(IDC_BOOKMARK_MANAGER, IDS_BOOKMARK_MANAGER); | 87 AddItem(IDC_BOOKMARK_MANAGER, IDS_BOOKMARK_MANAGER); |
88 AddCheckboxItem(IDC_BOOKMARK_BAR_ALWAYS_SHOW, IDS_BOOMARK_BAR_ALWAYS_SHOW); | 88 AddCheckboxItem(IDC_BOOKMARK_BAR_ALWAYS_SHOW, IDS_SHOW_BOOKMARK_BAR); |
89 } | 89 } |
90 | 90 |
91 void BookmarkContextMenuController::AddItem(int id, int localization_id) { | 91 void BookmarkContextMenuController::AddItem(int id, int localization_id) { |
92 menu_model_->AddItemWithStringId(id, localization_id); | 92 menu_model_->AddItemWithStringId(id, localization_id); |
93 } | 93 } |
94 | 94 |
95 void BookmarkContextMenuController::AddSeparator() { | 95 void BookmarkContextMenuController::AddSeparator() { |
96 menu_model_->AddSeparator(); | 96 menu_model_->AddSeparator(); |
97 } | 97 } |
98 | 98 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 delegate_->CloseMenu(); | 304 delegate_->CloseMenu(); |
305 } | 305 } |
306 | 306 |
307 bool BookmarkContextMenuController::HasURLs() const { | 307 bool BookmarkContextMenuController::HasURLs() const { |
308 for (size_t i = 0; i < selection_.size(); ++i) { | 308 for (size_t i = 0; i < selection_.size(); ++i) { |
309 if (bookmark_utils::NodeHasURLs(selection_[i])) | 309 if (bookmark_utils::NodeHasURLs(selection_[i])) |
310 return true; | 310 return true; |
311 } | 311 } |
312 return false; | 312 return false; |
313 } | 313 } |
OLD | NEW |