summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/bookmark_editor_view.h
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.h
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.h')
-rw-r--r--chrome/browser/views/bookmark_editor_view.h36
1 files changed, 6 insertions, 30 deletions
diff --git a/chrome/browser/views/bookmark_editor_view.h b/chrome/browser/views/bookmark_editor_view.h
index 6b472d2..8414544 100644
--- a/chrome/browser/views/bookmark_editor_view.h
+++ b/chrome/browser/views/bookmark_editor_view.h
@@ -7,6 +7,7 @@
#include <set>
+#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/views/controls/button/button.h"
#include "chrome/views/controls/menu/menu.h"
@@ -32,7 +33,8 @@ class Profile;
//
// To use BookmarkEditorView invoke the static show method.
-class BookmarkEditorView : public views::View,
+class BookmarkEditorView : public BookmarkEditor,
+ public views::View,
public views::ButtonListener,
public views::TreeViewController,
public views::DialogDelegate,
@@ -51,40 +53,14 @@ class BookmarkEditorView : public views::View,
FRIEND_TEST(BookmarkEditorViewTest, ChangeURLNoTree);
FRIEND_TEST(BookmarkEditorViewTest, ChangeTitleNoTree);
public:
- // Handler is notified when the BookmarkEditorView creates a new bookmark.
- // Handler is owned by the BookmarkEditorView and deleted when it is deleted.
- class Handler {
- public:
- virtual ~Handler() {}
- virtual void NodeCreated(BookmarkNode* new_node) = 0;
- };
-
- // An enumeration of the possible configurations offered.
- enum Configuration {
- SHOW_TREE,
- NO_TREE
- };
-
BookmarkEditorView(Profile* profile,
BookmarkNode* parent,
BookmarkNode* node,
- Configuration configuration,
- Handler* handler);
+ BookmarkEditor::Configuration configuration,
+ BookmarkEditor::Handler* handler);
virtual ~BookmarkEditorView();
- // Shows the BookmarkEditorView editing |node|. If |node| is NULL a new entry
- // is created initially parented to |parent|. If |show_tree| is false the
- // tree is not shown. BookmarkEditorView takes ownership of |handler| and
- // deletes it when done. |handler| may be null. See description of Handler
- // for details.
- static void Show(HWND parent_window,
- Profile* profile,
- BookmarkNode* parent,
- BookmarkNode* node,
- Configuration configuration,
- Handler* handler);
-
// DialogDelegate methods:
virtual bool IsDialogButtonEnabled(
MessageBoxFlags::DialogButton button) const;
@@ -280,7 +256,7 @@ class BookmarkEditorView : public views::View,
// Is the tree shown?
bool show_tree_;
- scoped_ptr<Handler> handler_;
+ scoped_ptr<BookmarkEditor::Handler> handler_;
DISALLOW_COPY_AND_ASSIGN(BookmarkEditorView);
};