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

Side by Side Diff: chrome/browser/views/bookmark_editor_view.h

Issue 165031: When we create a new folder in the BookmarkEditor, it is useful to be able to... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/views/bookmark_editor_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_EDITOR_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_EDITOR_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_BOOKMARK_EDITOR_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_BOOKMARK_EDITOR_VIEW_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "app/tree_node_model.h" 10 #include "app/tree_node_model.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 FRIEND_TEST(BookmarkEditorViewTest, ChangeParent); 46 FRIEND_TEST(BookmarkEditorViewTest, ChangeParent);
47 FRIEND_TEST(BookmarkEditorViewTest, ChangeParentAndURL); 47 FRIEND_TEST(BookmarkEditorViewTest, ChangeParentAndURL);
48 FRIEND_TEST(BookmarkEditorViewTest, ChangeURLToExistingURL); 48 FRIEND_TEST(BookmarkEditorViewTest, ChangeURLToExistingURL);
49 FRIEND_TEST(BookmarkEditorViewTest, EditTitleKeepsPosition); 49 FRIEND_TEST(BookmarkEditorViewTest, EditTitleKeepsPosition);
50 FRIEND_TEST(BookmarkEditorViewTest, EditURLKeepsPosition); 50 FRIEND_TEST(BookmarkEditorViewTest, EditURLKeepsPosition);
51 FRIEND_TEST(BookmarkEditorViewTest, ModelsMatch); 51 FRIEND_TEST(BookmarkEditorViewTest, ModelsMatch);
52 FRIEND_TEST(BookmarkEditorViewTest, MoveToNewParent); 52 FRIEND_TEST(BookmarkEditorViewTest, MoveToNewParent);
53 FRIEND_TEST(BookmarkEditorViewTest, NewURL); 53 FRIEND_TEST(BookmarkEditorViewTest, NewURL);
54 FRIEND_TEST(BookmarkEditorViewTest, ChangeURLNoTree); 54 FRIEND_TEST(BookmarkEditorViewTest, ChangeURLNoTree);
55 FRIEND_TEST(BookmarkEditorViewTest, ChangeTitleNoTree); 55 FRIEND_TEST(BookmarkEditorViewTest, ChangeTitleNoTree);
56 FRIEND_TEST(BookmarkEditorViewTest, ApplyDeleteNewNode);
56 public: 57 public:
57 BookmarkEditorView(Profile* profile, 58 BookmarkEditorView(Profile* profile,
58 const BookmarkNode* parent, 59 const BookmarkNode* parent,
59 const BookmarkNode* node, 60 const BookmarkNode* node,
60 BookmarkEditor::Configuration configuration, 61 BookmarkEditor::Configuration configuration,
61 BookmarkEditor::Handler* handler); 62 BookmarkEditor::Handler* handler);
62 63
63 virtual ~BookmarkEditorView(); 64 virtual ~BookmarkEditorView();
64 65
65 // DialogDelegate methods: 66 // DialogDelegate methods:
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Returns the node with the specified id, or NULL if one can't be found. 179 // Returns the node with the specified id, or NULL if one can't be found.
179 EditorNode* FindNodeWithID(BookmarkEditorView::EditorNode* node, int64 id); 180 EditorNode* FindNodeWithID(BookmarkEditorView::EditorNode* node, int64 id);
180 181
181 // Invokes ApplyEdits with the selected node. 182 // Invokes ApplyEdits with the selected node.
182 void ApplyEdits(); 183 void ApplyEdits();
183 184
184 // Applies the edits done by the user. |parent| gives the parent of the URL 185 // Applies the edits done by the user. |parent| gives the parent of the URL
185 // being edited. 186 // being edited.
186 void ApplyEdits(EditorNode* parent); 187 void ApplyEdits(EditorNode* parent);
187 188
189 // Applies the delete command to the BookmarkModel node that matches the
190 // currently selected EditorNode.
191 void ApplyDelete(TreeModelNode* node);
192
188 // Recursively adds newly created groups and sets the title of nodes to 193 // Recursively adds newly created groups and sets the title of nodes to
189 // match the user edited title. 194 // match the user edited title.
190 // 195 //
191 // bb_node gives the BookmarkNode the edits are to be applied to, with b_node 196 // bb_node gives the BookmarkNode the edits are to be applied to, with b_node
192 // the source of the edits. 197 // the source of the edits.
193 // 198 //
194 // If b_node == parent_b_node, parent_bb_node is set to bb_node. This is 199 // If b_node == parent_b_node, parent_bb_node is set to bb_node. This is
195 // used to determine the new BookmarkNode parent based on the EditorNode 200 // used to determine the new BookmarkNode parent based on the EditorNode
196 // parent. 201 // parent.
197 void ApplyNameChangesAndCreateNewGroups( 202 void ApplyNameChangesAndCreateNewGroups(
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 262
258 // Is the tree shown? 263 // Is the tree shown?
259 bool show_tree_; 264 bool show_tree_;
260 265
261 scoped_ptr<BookmarkEditor::Handler> handler_; 266 scoped_ptr<BookmarkEditor::Handler> handler_;
262 267
263 DISALLOW_COPY_AND_ASSIGN(BookmarkEditorView); 268 DISALLOW_COPY_AND_ASSIGN(BookmarkEditorView);
264 }; 269 };
265 270
266 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_EDITOR_VIEW_H_ 271 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_EDITOR_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/bookmark_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698