Index: chrome/browser/bookmarks/bookmark_editor.h |
diff --git a/chrome/browser/bookmarks/bookmark_editor.h b/chrome/browser/bookmarks/bookmark_editor.h |
index 39e99eac533544b348867008edc45390edf2b1f5..a8fd0ed1407c38e5e434c0f73fe599ec248556ee 100644 |
--- a/chrome/browser/bookmarks/bookmark_editor.h |
+++ b/chrome/browser/bookmarks/bookmark_editor.h |
@@ -27,7 +27,12 @@ class BookmarkEditor { |
}; |
// Describes what the user is editing. |
- struct EditDetails { |
+ class EditDetails { |
+ public: |
+ static EditDetails EditNode(const BookmarkNode* node); |
Rick Byers
2011/08/18 19:25:30
Nice, I like this change.
Add comments to these m
flackr
2011/08/23 17:41:44
Done.
|
+ static EditDetails AddNodeInFolder(const BookmarkNode* parent_node); |
+ static EditDetails AddFolder(const BookmarkNode* parent_node); |
+ |
enum Type { |
// The user is editing an existing node in the model. The node the user |
// is editing is set in |existing_node|. |
@@ -43,8 +48,6 @@ class BookmarkEditor { |
NEW_FOLDER |
}; |
- EditDetails(); |
- explicit EditDetails(const BookmarkNode* node); |
~EditDetails(); |
// See description of enum value for details. |
@@ -53,22 +56,34 @@ class BookmarkEditor { |
// If type == EXISTING_NODE this gives the existing node. |
const BookmarkNode* existing_node; |
+ // If type == NEW_URL or type == NEW_FOLDER this gives the parent node |
+ // to place the new node in. |
+ const BookmarkNode* parent_node; |
+ |
// If type == NEW_FOLDER, this is the urls/title pairs to add to the |
// folder. |
std::vector<std::pair<GURL, string16> > urls; |
+ |
+ private: |
+ EditDetails(); |
Rick Byers
2011/08/18 19:25:30
nice
|
}; |
- // Shows the bookmark editor. The bookmark editor allows editing an |
+ // Shows the native bookmark editor. The bookmark editor allows editing an |
// existing node or creating a new bookmark node (as determined by |
// |details.type|). If |configuration| is SHOW_TREE, a tree is shown allowing |
// the user to choose the parent of the node. |
// |parent| gives the initial parent to select in the tree for the node. |
// |parent| is only used if |details.existing_node| is null. |
- // TODO(flackr): Rename this to ShowNative and add cross platform Show method |
- // which will show a WebUI version of the dialog if --pure-views is set. |
+ static void ShowNative(gfx::NativeWindow parent_window, |
Rick Byers
2011/08/18 19:25:30
This can be private now (or soon), right? It woul
flackr
2011/08/23 17:41:44
Done.
|
+ Profile* profile, |
+ const BookmarkNode* parent, |
+ const EditDetails& details, |
+ Configuration configuration); |
+ |
+ // Shows the bookmark editor. If --use-more-webui is enabled use the bookmark |
+ // manager to add or edit bookmarks. |
Rick Byers
2011/08/18 19:25:30
add/move the detailed description of the args from
flackr
2011/08/23 17:41:44
Done.
|
static void Show(gfx::NativeWindow parent_window, |
Profile* profile, |
- const BookmarkNode* parent, |
const EditDetails& details, |
Configuration configuration); |
}; |