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

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

Issue 99131: Create a bookmark editor dialog interface and implement a GTK version. (Closed)
Patch Set: fixes for tony Created 11 years, 8 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/bookmarks/bookmark_context_menu.cc
diff --git a/chrome/browser/bookmarks/bookmark_context_menu.cc b/chrome/browser/bookmarks/bookmark_context_menu.cc
index 57f3631415c4ff5cfec3db8a177fe33870a2bf6b..039cd837eef733dd2577ec0700a877f85b23f49e 100644
--- a/chrome/browser/bookmarks/bookmark_context_menu.cc
+++ b/chrome/browser/bookmarks/bookmark_context_menu.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/bookmarks/bookmark_context_menu.h"
#include "base/compiler_specific.h"
+#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/browser.h"
@@ -21,7 +22,6 @@
// TODO(port): Port these files.
#if defined(OS_WIN)
#include "chrome/browser/tab_contents/tab_contents.h"
-#include "chrome/browser/views/bookmark_editor_view.h"
#include "chrome/browser/views/bookmark_manager_view.h"
#include "chrome/views/window/window.h"
#endif
@@ -189,7 +189,7 @@ class EditFolderController : public InputWindowDialog::Delegate,
// Used when adding a new bookmark. If a new bookmark is created it is selected
// in the bookmark manager.
-class SelectOnCreationHandler : public BookmarkEditorView::Handler {
+class SelectOnCreationHandler : public BookmarkEditor::Handler {
public:
explicit SelectOnCreationHandler(Profile* profile) : profile_(profile) {
}
@@ -336,17 +336,13 @@ void BookmarkContextMenu::ExecuteCommand(int id) {
}
if (selection_[0]->is_url()) {
-#if defined(OS_WIN)
- BookmarkEditorView::Configuration editor_config;
+ BookmarkEditor::Configuration editor_config;
if (configuration_ == BOOKMARK_BAR)
- editor_config = BookmarkEditorView::SHOW_TREE;
+ editor_config = BookmarkEditor::SHOW_TREE;
else
- editor_config = BookmarkEditorView::NO_TREE;
- BookmarkEditorView::Show(wnd_, profile_, NULL, selection_[0],
- editor_config, NULL);
-#else
- NOTIMPLEMENTED() << "BookmarkEditorView unimplemented";
-#endif
+ editor_config = BookmarkEditor::NO_TREE;
+ BookmarkEditor::Show(wnd_, profile_, NULL, selection_[0],
+ editor_config, NULL);
} else {
EditFolderController::Show(profile_, wnd_, selection_[0], false,
false);
@@ -368,21 +364,21 @@ void BookmarkContextMenu::ExecuteCommand(int id) {
case IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK: {
UserMetrics::RecordAction(L"BookmarkBar_ContextMenu_Add", profile_);
-#if defined(OS_WIN)
- BookmarkEditorView::Configuration editor_config;
- BookmarkEditorView::Handler* handler = NULL;
+ BookmarkEditor::Configuration editor_config;
+ BookmarkEditor::Handler* handler = NULL;
if (configuration_ == BOOKMARK_BAR) {
- editor_config = BookmarkEditorView::SHOW_TREE;
+ editor_config = BookmarkEditor::SHOW_TREE;
} else {
- editor_config = BookmarkEditorView::NO_TREE;
+ editor_config = BookmarkEditor::NO_TREE;
+#if defined(OS_WIN)
// This is owned by the BookmarkEditorView.
handler = new SelectOnCreationHandler(profile_);
- }
- BookmarkEditorView::Show(wnd_, profile_, GetParentForNewNodes(), NULL,
- editor_config, handler);
#else
- NOTIMPLEMENTED() << "Adding new bookmark not implemented";
+ NOTIMPLEMENTED() << "Custom SelectOnCreationHandler not implemented";
#endif
+ }
+ BookmarkEditor::Show(wnd_, profile_, GetParentForNewNodes(), NULL,
+ editor_config, handler);
break;
}
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_editor.h » ('j') | chrome/browser/gtk/bookmark_editor_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698