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

Unified Diff: chrome/browser/views/bookmark_editor_view.h

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/views/bookmark_editor_view.h
diff --git a/chrome/browser/views/bookmark_editor_view.h b/chrome/browser/views/bookmark_editor_view.h
index 6b472d20b4d19d4209c7f405ffaa28e40f886b5d..8414544ac6910e00148feba532da939328502cde 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);
};

Powered by Google App Engine
This is Rietveld 408576698