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/ui/views/bookmarks/bookmark_context_menu_controller_vie
ws.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_vie
ws.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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 delegate_->AddSeparator(); | 83 delegate_->AddSeparator(); |
84 delegate_->AddItemWithStringId(IDC_BOOKMARK_BAR_ADD_NEW_BOOKMARK, | 84 delegate_->AddItemWithStringId(IDC_BOOKMARK_BAR_ADD_NEW_BOOKMARK, |
85 IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK); | 85 IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK); |
86 delegate_->AddItemWithStringId(IDC_BOOKMARK_BAR_NEW_FOLDER, | 86 delegate_->AddItemWithStringId(IDC_BOOKMARK_BAR_NEW_FOLDER, |
87 IDS_BOOMARK_BAR_NEW_FOLDER); | 87 IDS_BOOMARK_BAR_NEW_FOLDER); |
88 | 88 |
89 delegate_->AddSeparator(); | 89 delegate_->AddSeparator(); |
90 delegate_->AddItemWithStringId(IDC_BOOKMARK_MANAGER, IDS_BOOKMARK_MANAGER); | 90 delegate_->AddItemWithStringId(IDC_BOOKMARK_MANAGER, IDS_BOOKMARK_MANAGER); |
91 delegate_->AddCheckboxItem(IDC_BOOKMARK_BAR_ALWAYS_SHOW, | 91 delegate_->AddCheckboxItem(IDC_BOOKMARK_BAR_ALWAYS_SHOW, |
92 IDS_BOOMARK_BAR_ALWAYS_SHOW); | 92 IDS_SHOW_BOOKMARK_BAR); |
93 } | 93 } |
94 | 94 |
95 void BookmarkContextMenuControllerViews::ExecuteCommand(int id) { | 95 void BookmarkContextMenuControllerViews::ExecuteCommand(int id) { |
96 BookmarkModel* model = RemoveModelObserver(); | 96 BookmarkModel* model = RemoveModelObserver(); |
97 | 97 |
98 switch (id) { | 98 switch (id) { |
99 case IDC_BOOKMARK_BAR_OPEN_ALL: | 99 case IDC_BOOKMARK_BAR_OPEN_ALL: |
100 case IDC_BOOKMARK_BAR_OPEN_ALL_INCOGNITO: | 100 case IDC_BOOKMARK_BAR_OPEN_ALL_INCOGNITO: |
101 case IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW: { | 101 case IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW: { |
102 WindowOpenDisposition initial_disposition; | 102 WindowOpenDisposition initial_disposition; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 return model; | 295 return model; |
296 } | 296 } |
297 | 297 |
298 bool BookmarkContextMenuControllerViews::HasURLs() const { | 298 bool BookmarkContextMenuControllerViews::HasURLs() const { |
299 for (size_t i = 0; i < selection_.size(); ++i) { | 299 for (size_t i = 0; i < selection_.size(); ++i) { |
300 if (bookmark_utils::NodeHasURLs(selection_[i])) | 300 if (bookmark_utils::NodeHasURLs(selection_[i])) |
301 return true; | 301 return true; |
302 } | 302 } |
303 return false; | 303 return false; |
304 } | 304 } |
OLD | NEW |