diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-29 23:38:06 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-29 23:38:06 +0000 |
commit | 7f856bee73ffdccdbbbbbab4cb79185290d38359 (patch) | |
tree | a837328e08a113abdc70b2fc0ae2f2a4a3f804eb /chrome/browser/views/bookmark_editor_view.h | |
parent | 281fe14063dd8fb81cea102f5abb7b82f407c3d1 (diff) | |
download | chromium_src-7f856bee73ffdccdbbbbbab4cb79185290d38359.zip chromium_src-7f856bee73ffdccdbbbbbab4cb79185290d38359.tar.gz chromium_src-7f856bee73ffdccdbbbbbab4cb79185290d38359.tar.bz2 |
First cut at the bookmark manager. There are still a fair number of
rough edges, but I'm at a good point where I want to land what I
have. Here's what is left:
. Flicker on show, likely the result of restoring window placement.
. tree flickers when dragging splitter.
. table/tree need to autoscroll when drop cursor held at bottom of view.
. prompts for deleting.
. When you move an item the table snaps to the top, this is because
I'm sending out model changed. need a better notification.
. Operations in menu to add need to change selection.
. Remember split location.
I would have preferred to split this up into a couple of reviews, but
everything is intertwined now. Sorry.
BUG=674
TEST=don't test the bookmark manager yet, but make sure bookmark bar
still works.
Review URL: http://codereview.chromium.org/8197
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4191 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_editor_view.h')
-rw-r--r-- | chrome/browser/views/bookmark_editor_view.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/chrome/browser/views/bookmark_editor_view.h b/chrome/browser/views/bookmark_editor_view.h index 796f041..4e6e317 100644 --- a/chrome/browser/views/bookmark_editor_view.h +++ b/chrome/browser/views/bookmark_editor_view.h @@ -47,17 +47,28 @@ class BookmarkEditorView : public views::View, FRIEND_TEST(BookmarkEditorViewTest, ModelsMatch); FRIEND_TEST(BookmarkEditorViewTest, MoveToNewParent); FRIEND_TEST(BookmarkEditorViewTest, NewURL); + FRIEND_TEST(BookmarkEditorViewTest, ChangeURLNoTree); + FRIEND_TEST(BookmarkEditorViewTest, ChangeTitleNoTree); public: + // An enumeration of the possible configurations offered. + enum Configuration { + SHOW_TREE, + NO_TREE + }; + // Shows the BookmarkEditorView editing |node|. If |node| is NULL a new entry - // is created initially parented to |parent|. + // is created initially parented to |parent|. If |show_tree| is false the + // tree is not shown. static void Show(HWND parent_window, Profile* profile, BookmarkNode* parent, - BookmarkNode* node); + BookmarkNode* node, + Configuration configuration); BookmarkEditorView(Profile* profile, BookmarkNode* parent, - BookmarkNode* node); + BookmarkNode* node, + Configuration configuration); virtual ~BookmarkEditorView(); @@ -148,7 +159,8 @@ class BookmarkEditorView : public views::View, int index); virtual void BookmarkNodeRemoved(BookmarkModel* model, BookmarkNode* parent, - int index); + int index, + BookmarkNode* node); virtual void BookmarkNodeChanged(BookmarkModel* model, BookmarkNode* node) {} virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, @@ -222,10 +234,10 @@ class BookmarkEditorView : public views::View, scoped_ptr<EditorTreeModel> tree_model_; // Displays star groups. - views::TreeView tree_view_; + views::TreeView* tree_view_; // Used to create a new group. - views::NativeButton new_group_button_; + scoped_ptr<views::NativeButton> new_group_button_; // Used for editing the URL. views::TextField url_tf_; @@ -249,6 +261,9 @@ class BookmarkEditorView : public views::View, // nodes. bool running_menu_for_root_; + // Is the tree shown? + bool show_tree_; + DISALLOW_COPY_AND_ASSIGN(BookmarkEditorView); }; |