Index: chrome/browser/extensions/api/bookmarks/bookmarks_api.h |
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h |
index fc73e0c76f045cd6b62fdc4d324ea31f3095fd89..2c02d87b5c956c98f90331a3f173e3fabe62ede8 100644 |
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h |
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h |
@@ -18,6 +18,8 @@ |
#include "extensions/browser/event_router.h" |
#include "ui/shell_dialogs/select_file_dialog.h" |
+class ChromeBookmarkClient; |
+ |
namespace base { |
class FilePath; |
class ListValue; |
@@ -125,6 +127,9 @@ class BookmarksFunction : public ChromeAsyncExtensionFunction, |
// RunAsync semantic equivalent called when the bookmarks are ready. |
virtual bool RunOnReady() = 0; |
+ // Helper to get the ChromeBookmarkClient. |
+ ChromeBookmarkClient* GetChromeBookmarkClient(); |
+ |
// Helper to get the bookmark id as int64 from the given string id. |
// Sets error_ to an error string if the given id string can't be parsed |
// as an int64. In case of error, doesn't change id and returns false. |
@@ -146,6 +151,12 @@ class BookmarksFunction : public ChromeAsyncExtensionFunction, |
// error_ to the appropriate error string. |
bool EditBookmarksEnabled(); |
+ // Helper that checks if |node| can be modified. Returns false if |node| |
+ // is NULL, or a managed node, or the root node. In these cases the node |
+ // can't be edited, can't have new child nodes appended, and its direct |
+ // children can't be moved or reordered. |
+ bool CanBeModified(const BookmarkNode* node); |
+ |
private: |
// BaseBookmarkModelObserver: |
virtual void BookmarkModelChanged() OVERRIDE; |