diff options
Diffstat (limited to 'chrome/browser/extensions/extension_bookmark_manager_api.h')
-rw-r--r-- | chrome/browser/extensions/extension_bookmark_manager_api.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_bookmark_manager_api.h b/chrome/browser/extensions/extension_bookmark_manager_api.h index 2ab6be6c..f0bf1a3 100644 --- a/chrome/browser/extensions/extension_bookmark_manager_api.h +++ b/chrome/browser/extensions/extension_bookmark_manager_api.h @@ -6,6 +6,8 @@ #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_MANAGER_API_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 { public: @@ -34,6 +36,39 @@ class PasteBookmarkManagerFunction : public AsyncExtensionFunction { DECLARE_EXTENSION_FUNCTION_NAME("experimental.bookmarkManager.paste"); }; +class BookmarkManagerIOFunction : public BookmarksFunction, + public SelectFileDialog::Listener { + public: + // Overridden from SelectFileDialog::Listener: + virtual void FileSelected(const FilePath& path, int index, void* params) = 0; + void MultiFilesSelected(const std::vector<FilePath>& files, void* params); + void FileSelectionCanceled(void* params); + void SelectFile(SelectFileDialog::Type type); + + protected: + scoped_refptr<SelectFileDialog> select_file_dialog_; +}; + +class ImportBookmarksFunction : public BookmarkManagerIOFunction { + public: + // Override BookmarkManagerFunction. + bool RunImpl(); + void FileSelected(const FilePath& path, int index, void* params); + + private: + DECLARE_EXTENSION_FUNCTION_NAME("experimental.bookmarkManager.import"); +}; + +class ExportBookmarksFunction : public BookmarkManagerIOFunction { + public: + // Override BookmarkManagerFunction. + bool RunImpl(); + void FileSelected(const FilePath& path, int index, void* params); + + private: + DECLARE_EXTENSION_FUNCTION_NAME("experimental.bookmarkManager.export"); +}; + class BookmarkManagerGetStringsFunction : public AsyncExtensionFunction { public: // Override BookmarkManagerFunction. @@ -43,5 +78,4 @@ class BookmarkManagerGetStringsFunction : public AsyncExtensionFunction { DECLARE_EXTENSION_FUNCTION_NAME("experimental.bookmarkManager.getStrings"); }; - #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_MANAGER_API_H_ |