OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BOOKMARKS_BOOKMARK_EDITOR_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_ |
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
| 13 #include "base/string16.h" |
13 #include "gfx/native_widget_types.h" | 14 #include "gfx/native_widget_types.h" |
14 | 15 |
15 class BookmarkNode; | 16 class BookmarkNode; |
16 class GURL; | 17 class GURL; |
17 class Profile; | 18 class Profile; |
18 | 19 |
19 // Small, cross platform interface that shows the correct platform specific | 20 // Small, cross platform interface that shows the correct platform specific |
20 // bookmark editor dialog. | 21 // bookmark editor dialog. |
21 class BookmarkEditor { | 22 class BookmarkEditor { |
22 public: | 23 public: |
(...skipping 28 matching lines...) Expand all Loading... |
51 } | 52 } |
52 | 53 |
53 // See description of enum value for details. | 54 // See description of enum value for details. |
54 Type type; | 55 Type type; |
55 | 56 |
56 // If type == EXISTING_NODE this gives the existing node. | 57 // If type == EXISTING_NODE this gives the existing node. |
57 const BookmarkNode* existing_node; | 58 const BookmarkNode* existing_node; |
58 | 59 |
59 // If type == NEW_FOLDER, this is the urls/title pairs to add to the | 60 // If type == NEW_FOLDER, this is the urls/title pairs to add to the |
60 // folder. | 61 // folder. |
61 std::vector<std::pair<GURL, std::wstring> > urls; | 62 std::vector<std::pair<GURL, string16> > urls; |
62 }; | 63 }; |
63 | 64 |
64 // Shows the bookmark editor. The bookmark editor allows editing an | 65 // Shows the bookmark editor. The bookmark editor allows editing an |
65 // existing node or creating a new bookmark node (as determined by | 66 // existing node or creating a new bookmark node (as determined by |
66 // |details.type|). If |configuration| is SHOW_TREE, a tree is shown allowing | 67 // |details.type|). If |configuration| is SHOW_TREE, a tree is shown allowing |
67 // the user to choose the parent of the node. | 68 // the user to choose the parent of the node. |
68 // |parent| gives the initial parent to select in the tree for the node. | 69 // |parent| gives the initial parent to select in the tree for the node. |
69 // |parent| is only used if |details.existing_node| is null. | 70 // |parent| is only used if |details.existing_node| is null. |
70 static void Show(gfx::NativeWindow parent_window, | 71 static void Show(gfx::NativeWindow parent_window, |
71 Profile* profile, | 72 Profile* profile, |
72 const BookmarkNode* parent, | 73 const BookmarkNode* parent, |
73 const EditDetails& details, | 74 const EditDetails& details, |
74 Configuration configuration); | 75 Configuration configuration); |
75 }; | 76 }; |
76 | 77 |
77 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_ | 78 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_ |
OLD | NEW |