Chromium Code Reviews| Index: chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_views.cc |
| diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_views.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_views.cc |
| index fe6ff6b1bb8e607ed257a821104c926cccfc6720..0b84c80240beffc433bceb94ddeffc4ee03a42de 100644 |
| --- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_views.cc |
| +++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_views.cc |
| @@ -129,9 +129,15 @@ void BookmarkContextMenuControllerViews::ExecuteCommand(int id) { |
| } |
| if (selection_[0]->is_url()) { |
| +#if defined(WEBUI_BOOKMARK_EDITOR) |
|
Rick Byers
2011/08/04 18:26:07
You've really had to sprinkle this #ifdef in a lot
flackr
2011/08/12 18:11:24
I completely agree. As we discussed I think a slig
|
| + Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); |
| + DCHECK(browser); |
| + browser->OpenBookmarkManagerEditNode(selection_[0]->id()); |
| +#else |
| BookmarkEditor::Show(parent_widget_->GetNativeWindow(), profile_, |
| parent_, BookmarkEditor::EditDetails(selection_[0]), |
| BookmarkEditor::SHOW_TREE); |
| +#endif |
| } else { |
| BookmarkFolderEditorController::Show(profile_, |
| parent_widget_->GetNativeWindow(), selection_[0], -1, |
| @@ -157,11 +163,17 @@ void BookmarkContextMenuControllerViews::ExecuteCommand(int id) { |
| UserMetrics::RecordAction( |
| UserMetricsAction("BookmarkBar_ContextMenu_Add")); |
| +#if defined(WEBUI_BOOKMARK_EDITOR) |
| + Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); |
| + DCHECK(browser); |
| + browser->OpenBookmarkManagerAddNodeIn(selection_[0]->id()); |
| +#else |
| // TODO: this should honor the index from GetParentForNewNodes. |
| BookmarkEditor::Show( |
| parent_widget_->GetNativeWindow(), profile_, |
| bookmark_utils::GetParentForNewNodes(parent_, selection_, NULL), |
| BookmarkEditor::EditDetails(), BookmarkEditor::SHOW_TREE); |
| +#endif |
| break; |
| } |