diff options
Diffstat (limited to 'chrome/browser/extensions/extension_bookmark_manager_api.h')
-rw-r--r-- | chrome/browser/extensions/extension_bookmark_manager_api.h | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/chrome/browser/extensions/extension_bookmark_manager_api.h b/chrome/browser/extensions/extension_bookmark_manager_api.h index f0bf1a3..72f1bf0 100644 --- a/chrome/browser/extensions/extension_bookmark_manager_api.h +++ b/chrome/browser/extensions/extension_bookmark_manager_api.h @@ -5,39 +5,58 @@ #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_MANAGER_API_H_ #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_MANAGER_API_H_ +#include "chrome/browser/extensions/extension_bookmarks_module.h" #include "chrome/browser/extensions/extension_function.h" #include "chrome/browser/shell_dialogs.h" -#include "chrome/browser/extensions/extension_bookmarks_module.h" -class CopyBookmarkManagerFunction : public AsyncExtensionFunction { +class BookmarkNode; + +class ClipboardBookmarkManagerFunction : public BookmarksFunction { + protected: + bool CopyOrCut(bool cut); + // Returns a single bookmark node from the ID passed as the first argument. + const BookmarkNode* GetNodeFromArguments(); +}; + +class CopyBookmarkManagerFunction : public ClipboardBookmarkManagerFunction { public: - // Override BookmarkManagerFunction. + // Override ClipboardBookmarkManagerFunction. virtual bool RunImpl(); private: DECLARE_EXTENSION_FUNCTION_NAME("experimental.bookmarkManager.copy"); }; -class CutBookmarkManagerFunction : public AsyncExtensionFunction { +class CutBookmarkManagerFunction : public ClipboardBookmarkManagerFunction { public: - // Override BookmarkManagerFunction. + // Override ClipboardBookmarkManagerFunction. virtual bool RunImpl(); private: DECLARE_EXTENSION_FUNCTION_NAME("experimental.bookmarkManager.cut"); }; -class PasteBookmarkManagerFunction : public AsyncExtensionFunction { +class PasteBookmarkManagerFunction : public ClipboardBookmarkManagerFunction { public: - // Override BookmarkManagerFunction. + // Override ClipboardBookmarkManagerFunction. virtual bool RunImpl(); private: DECLARE_EXTENSION_FUNCTION_NAME("experimental.bookmarkManager.paste"); }; +class CanPasteBookmarkManagerFunction + : public ClipboardBookmarkManagerFunction { + public: + // Override ClipboardBookmarkManagerFunction. + virtual bool RunImpl(); + + private: + DECLARE_EXTENSION_FUNCTION_NAME("experimental.bookmarkManager.canPaste"); +}; + class BookmarkManagerIOFunction : public BookmarksFunction, - public SelectFileDialog::Listener { + public SelectFileDialog::Listener { public: // Overridden from SelectFileDialog::Listener: virtual void FileSelected(const FilePath& path, int index, void* params) = 0; @@ -51,7 +70,7 @@ class BookmarkManagerIOFunction : public BookmarksFunction, class ImportBookmarksFunction : public BookmarkManagerIOFunction { public: - // Override BookmarkManagerFunction. + // Override BookmarkManagerIOFunction. bool RunImpl(); void FileSelected(const FilePath& path, int index, void* params); @@ -61,7 +80,7 @@ class ImportBookmarksFunction : public BookmarkManagerIOFunction { class ExportBookmarksFunction : public BookmarkManagerIOFunction { public: - // Override BookmarkManagerFunction. + // Override BookmarkManagerIOFunction. bool RunImpl(); void FileSelected(const FilePath& path, int index, void* params); @@ -71,7 +90,7 @@ class ExportBookmarksFunction : public BookmarkManagerIOFunction { class BookmarkManagerGetStringsFunction : public AsyncExtensionFunction { public: - // Override BookmarkManagerFunction. + // Override AsyncExtensionFunction. virtual bool RunImpl(); private: |