| Index: chrome/browser/extensions/api/media_galleries/media_galleries_api.h
|
| ===================================================================
|
| --- chrome/browser/extensions/api/media_galleries/media_galleries_api.h (revision 243958)
|
| +++ chrome/browser/extensions/api/media_galleries/media_galleries_api.h (working copy)
|
| @@ -8,6 +8,7 @@
|
| #ifndef CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_
|
| #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_
|
|
|
| +#include <string>
|
| #include <vector>
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| @@ -78,6 +79,39 @@
|
| const MediaStorageUtil::DeviceIdSet* available_devices);
|
| };
|
|
|
| +class MediaGalleriesAddUserSelectedFolderFunction
|
| + : public ChromeAsyncExtensionFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION("mediaGalleries.addUserSelectedFolder",
|
| + MEDIAGALLERIES_ADDUSERSELECTEDFOLDER)
|
| +
|
| + protected:
|
| + virtual ~MediaGalleriesAddUserSelectedFolderFunction();
|
| + virtual bool RunImpl() OVERRIDE;
|
| +
|
| + private:
|
| + // Bottom half for RunImpl, invoked after the preferences is initialized.
|
| + void OnPreferencesInit();
|
| +
|
| + // Callback for the directory prompt request, with the input from the user.
|
| + // If |selected_directory| is empty, then the user canceled.
|
| + // Either handle the user canceled case or add the selected gallery.
|
| + void OnDirectorySelected(const base::FilePath& selected_directory);
|
| +
|
| + // Callback for the directory prompt request. |pref_id| is for the gallery
|
| + // the user just added. |filesystems| is the entire list of file systems.
|
| + // The fsid for the file system that corresponds to |pref_id| will be
|
| + // appended to the list of file systems returned to the caller. The
|
| + // Javascript binding for this API will interpret the list appropriately.
|
| + void ReturnGalleriesAndId(
|
| + MediaGalleryPrefId pref_id,
|
| + const std::vector<MediaFileSystemInfo>& filesystems);
|
| +
|
| + // A helper method that calls
|
| + // MediaFileSystemRegistry::GetMediaFileSystemsForExtension().
|
| + void GetMediaFileSystemsForExtension(const MediaFileSystemsCallback& cb);
|
| +};
|
| +
|
| class MediaGalleriesGetMetadataFunction : public ChromeAsyncExtensionFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION("mediaGalleries.getMetadata",
|
|
|