summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi
diff options
context:
space:
mode:
authorgbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 19:10:53 +0000
committergbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 19:10:53 +0000
commit4bbcae51f6b736b1735a36d39d9cd3c7a2cc81d3 (patch)
tree131934a623685b230388d7d623ad49bb6eb6bade /webkit/fileapi
parentd0d12196a9702ddda30a128df619685f86d6bc17 (diff)
downloadchromium_src-4bbcae51f6b736b1735a36d39d9cd3c7a2cc81d3.zip
chromium_src-4bbcae51f6b736b1735a36d39d9cd3c7a2cc81d3.tar.gz
chromium_src-4bbcae51f6b736b1735a36d39d9cd3c7a2cc81d3.tar.bz2
Filesystem interface for Mac PTP/MTP devices using ImageCaptureCore
BUG=151681 Review URL: https://chromiumcodereview.appspot.com/11416089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi')
-rw-r--r--webkit/fileapi/media/mtp_device_delegate.h10
-rw-r--r--webkit/fileapi/media/mtp_device_file_system_config.h7
2 files changed, 12 insertions, 5 deletions
diff --git a/webkit/fileapi/media/mtp_device_delegate.h b/webkit/fileapi/media/mtp_device_delegate.h
index a5e89ac..31569d2 100644
--- a/webkit/fileapi/media/mtp_device_delegate.h
+++ b/webkit/fileapi/media/mtp_device_delegate.h
@@ -31,14 +31,20 @@ class MTPDeviceDelegate {
// Returns a pointer to a new instance of AbstractFileEnumerator to enumerate
// the file entries of |root| path. The instance needs to be freed by the
// caller, and its lifetime should not extend past when the current call
- // returns to the main media task runner thread.
+ // returns to the main media task runner thread. Callers must ensure the
+ // lifetime of the enumerator is shorter than the MTPDeviceDelegate
+ // implementation itself. Calls to the enumerator are made in the context of
+ // a SeuqencedWorkerPool, and the enumerator may block while it is being
+ // called.
virtual scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator>
CreateFileEnumerator(const base::FilePath& root,
bool recursive) = 0;
// Updates the temporary snapshot file contents given by |local_path| with
// media file contents given by |device_file_path| and also returns the
- // metadata of the temporary file.
+ // metadata of the temporary file. All calls to this interface method are
+ // made in the context of a SequencedWorkerPool, and so only one call will be
+ // active at once. Implementations may block this pool.
virtual base::PlatformFileError CreateSnapshotFile(
const base::FilePath& device_file_path,
const base::FilePath& local_path,
diff --git a/webkit/fileapi/media/mtp_device_file_system_config.h b/webkit/fileapi/media/mtp_device_file_system_config.h
index b7cd5d2..cf721e9 100644
--- a/webkit/fileapi/media/mtp_device_file_system_config.h
+++ b/webkit/fileapi/media/mtp_device_file_system_config.h
@@ -7,9 +7,10 @@
#include "build/build_config.h"
-// Support MTP device file system for Windows, Linux and ChromeOS. Note that
-// OS_LINUX implies OS_CHROMEOS.
-#if defined(OS_WIN) || defined(OS_LINUX)
+// Support MTP device file system for Windows, Mac, Linux and ChromeOS.
+// Note that OS_LINUX implies OS_CHROMEOS.
+// TODO(gbillock): remove this header and make this default.
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
#define SUPPORT_MTP_DEVICE_FILESYSTEM
#endif