Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4168)

Unified Diff: chrome/browser/bookmarks/bookmark_context_menu_controller.cc

Issue 7572022: Use bookmark manager to add/edit bookmark pages with webui_dialogs=1. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Windows build compatibility. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/common.gypi ('k') | chrome/browser/bookmarks/bookmark_editor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_context_menu_controller.cc
diff --git a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc
index ad98a0312c850263dc06ff63faf1575b6ee3452f..73820d8c80effa26a647ddbd9380614560f3bfc8 100644
--- a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc
+++ b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc
@@ -139,9 +139,15 @@ void BookmarkContextMenuController::ExecuteCommand(int id) {
}
if (selection_[0]->is_url()) {
+#if defined(WEBUI_DIALOGS)
+ Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
+ DCHECK(browser);
+ browser->OpenBookmarkManagerEditNode(selection_[0]->id());
+#else
BookmarkEditor::Show(parent_window_, profile_, parent_,
BookmarkEditor::EditDetails(selection_[0]),
BookmarkEditor::SHOW_TREE);
+#endif
} else {
BookmarkFolderEditorController::Show(profile_, parent_window_,
selection_[0], -1,
@@ -166,11 +172,17 @@ void BookmarkContextMenuController::ExecuteCommand(int id) {
UserMetrics::RecordAction(
UserMetricsAction("BookmarkBar_ContextMenu_Add"));
+#if defined(WEBUI_DIALOGS)
+ Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
+ DCHECK(browser);
+ browser->OpenBookmarkManagerAddNodeIn(selection_[0]->id());
+#else
// TODO: this should honor the index from GetParentForNewNodes.
BookmarkEditor::Show(
parent_window_, profile_,
bookmark_utils::GetParentForNewNodes(parent_, selection_, NULL),
BookmarkEditor::EditDetails(), BookmarkEditor::SHOW_TREE);
+#endif
break;
}
« no previous file with comments | « build/common.gypi ('k') | chrome/browser/bookmarks/bookmark_editor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698