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

Unified Diff: chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.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
Index: chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
index e618c1843f1e3d7e159aa57a173998600da3df82..a27505bab0e6ac7a80f099ccc0419ba6023201e9 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
@@ -17,6 +17,8 @@
#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/bookmarks/recently_used_folders_combo_model.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
@@ -306,17 +308,25 @@ void BookmarkBubbleGtk::ShowEditor() {
// Commit any edits now.
ApplyEdits();
+#if !defined(WEBUI_DIALOGS)
// Closing might delete us, so we'll cache what we need on the stack.
Profile* profile = profile_;
GtkWindow* toplevel = GTK_WINDOW(gtk_widget_get_toplevel(anchor_));
+#endif
// Close the bubble, deleting the C++ objects, etc.
bubble_->Close();
if (node) {
+#if defined(WEBUI_DIALOGS)
+ Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
+ DCHECK(browser);
+ browser->OpenBookmarkManagerEditNode(node->id());
+#else
BookmarkEditor::Show(toplevel, profile, NULL,
BookmarkEditor::EditDetails(node),
BookmarkEditor::SHOW_TREE);
+#endif
}
}
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698