Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / media_galleries / mac / mtp_device_delegate_impl_mac.h
index fecd069..0440fbd 100644 (file)
@@ -10,9 +10,9 @@
 #include <vector>
 
 #include "base/containers/hash_tables.h"
+#include "base/files/file.h"
 #include "base/files/file_path.h"
 #include "base/memory/weak_ptr.h"
-#include "base/platform_file.h"
 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h"
 
 // Delegate for presenting an Image Capture device through the filesystem
@@ -32,32 +32,37 @@ class MTPDeviceDelegateImplMac : public MTPDeviceAsyncDelegate {
   // MTPDeviceAsyncDelegate implementation. These functions are called on the
   // IO thread by the async filesystem file util. They forward to
   // similarly-named methods on the UI thread.
-  virtual void GetFileInfo(
-      const base::FilePath& file_path,
-      const GetFileInfoSuccessCallback& success_callback,
-      const ErrorCallback& error_callback) OVERRIDE;
+  void GetFileInfo(const base::FilePath& file_path,
+                   const GetFileInfoSuccessCallback& success_callback,
+                   const ErrorCallback& error_callback) override;
 
   // Note: passed absolute paths, but expects relative paths in reply.
-  virtual void ReadDirectory(
-      const base::FilePath& root,
-      const ReadDirectorySuccessCallback& success_callback,
-      const ErrorCallback& error_callback) OVERRIDE;
+  void ReadDirectory(const base::FilePath& root,
+                     const ReadDirectorySuccessCallback& success_callback,
+                     const ErrorCallback& error_callback) override;
 
   // Note: passed absolute paths.
-  virtual void CreateSnapshotFile(
+  void CreateSnapshotFile(
       const base::FilePath& device_file_path,
       const base::FilePath& local_path,
       const CreateSnapshotFileSuccessCallback& success_callback,
-      const ErrorCallback& error_callback) OVERRIDE;
-  virtual void CancelPendingTasksAndDeleteDelegate() OVERRIDE;
+      const ErrorCallback& error_callback) override;
+  bool IsStreaming() override;
+  void ReadBytes(const base::FilePath& device_file_path,
+                 const scoped_refptr<net::IOBuffer>& buf,
+                 int64 offset,
+                 int buf_len,
+                 const ReadBytesSuccessCallback& success_callback,
+                 const ErrorCallback& error_callback) override;
+  void CancelPendingTasksAndDeleteDelegate() override;
 
   // Forward delegates for ImageCaptureDeviceListener. These are
   // invoked in callbacks of the ImageCapture library on the UI thread.
   virtual void ItemAdded(const std::string& name,
-                         const base::PlatformFileInfo& info);
+                         const base::File::Info& info);
   virtual void NoMoreItems();
   virtual void DownloadedFile(const std::string& name,
-                              base::PlatformFileError error);
+                              base::File::Error error);
 
   // Scheduled when early directory reads are requested. The
   // timeout will signal an ABORT error to the caller if the
@@ -67,12 +72,12 @@ class MTPDeviceDelegateImplMac : public MTPDeviceAsyncDelegate {
  private:
   class DeviceListener;
 
-  virtual ~MTPDeviceDelegateImplMac();
+  ~MTPDeviceDelegateImplMac() override;
 
   // Delegate for GetFileInfo, called on the UI thread.
   void GetFileInfoImpl(const base::FilePath& file_path,
-                       base::PlatformFileInfo* file_info,
-                       base::PlatformFileError* error);
+                       base::File::Info* file_info,
+                       base::File::Error* error);
 
   // Delegate for ReadDirectory, called on the UI thread.
   void ReadDirectoryImpl(
@@ -106,7 +111,7 @@ class MTPDeviceDelegateImplMac : public MTPDeviceAsyncDelegate {
 
   // Stores a map from filename to file metadata received from the camera.
   base::hash_map<base::FilePath::StringType,
-                 base::PlatformFileInfo> file_info_;
+                 base::File::Info> file_info_;
 
   // List of filenames received from the camera.
   std::vector<base::FilePath> file_paths_;