summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/bookmark_editor_view.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-28 19:32:15 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-28 19:32:15 +0000
commitef49de68beef6d5adf699518f8ef86f47b9f8b33 (patch)
treed325591020879e84a6bdea2433f1893a78ca75da /chrome/browser/views/bookmark_editor_view.cc
parentb938c4cd5adac79efc4453ccf1a53f9e70c29293 (diff)
downloadchromium_src-ef49de68beef6d5adf699518f8ef86f47b9f8b33.zip
chromium_src-ef49de68beef6d5adf699518f8ef86f47b9f8b33.tar.gz
chromium_src-ef49de68beef6d5adf699518f8ef86f47b9f8b33.tar.bz2
Create a bookmark editor dialog interface and implement a GTK version.
The GTK version is currently limited to only editing the name/url of the bookmark; I'm submitting this since it's getting big and I want a design review. Review URL: http://codereview.chromium.org/99131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_editor_view.cc')
-rw-r--r--chrome/browser/views/bookmark_editor_view.cc39
1 files changed, 20 insertions, 19 deletions
diff --git a/chrome/browser/views/bookmark_editor_view.cc b/chrome/browser/views/bookmark_editor_view.cc
index eb00198..60d8179 100644
--- a/chrome/browser/views/bookmark_editor_view.cc
+++ b/chrome/browser/views/bookmark_editor_view.cc
@@ -42,11 +42,25 @@ static const int kTreeWidth = 300;
// ID for various children.
static const int kNewGroupButtonID = 1002;
-BookmarkEditorView::BookmarkEditorView(Profile* profile,
- BookmarkNode* parent,
- BookmarkNode* node,
- Configuration configuration,
- Handler* handler)
+// static
+void BookmarkEditor::Show(HWND parent_hwnd,
+ Profile* profile,
+ BookmarkNode* parent,
+ BookmarkNode* node,
+ Configuration configuration,
+ Handler* handler) {
+ DCHECK(profile);
+ BookmarkEditorView* editor =
+ new BookmarkEditorView(profile, parent, node, configuration, handler);
+ editor->Show(parent_hwnd);
+}
+
+BookmarkEditorView::BookmarkEditorView(
+ Profile* profile,
+ BookmarkNode* parent,
+ BookmarkNode* node,
+ BookmarkEditor::Configuration configuration,
+ BookmarkEditor::Handler* handler)
: profile_(profile),
tree_view_(NULL),
new_group_button_(NULL),
@@ -67,19 +81,6 @@ BookmarkEditorView::~BookmarkEditorView() {
bb_model_->RemoveObserver(this);
}
-// static
-void BookmarkEditorView::Show(HWND parent_hwnd,
- Profile* profile,
- BookmarkNode* parent,
- BookmarkNode* node,
- Configuration configuration,
- Handler* handler) {
- DCHECK(profile);
- BookmarkEditorView* editor =
- new BookmarkEditorView(profile, parent, node, configuration, handler);
- editor->Show(parent_hwnd);
-}
-
bool BookmarkEditorView::IsDialogButtonEnabled(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
@@ -489,7 +490,7 @@ void BookmarkEditorView::ApplyEdits(EditorNode* parent) {
BookmarkNode* old_parent = node_ ? node_->GetParent() : NULL;
const int old_index = old_parent ? old_parent->IndexOfChild(node_) : -1;
- if (!show_tree_ ) {
+ if (!show_tree_) {
if (!node_) {
BookmarkNode* node =
bb_model_->AddURL(parent_, parent_->GetChildCount(), new_title,