1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h"
15 class DeviceMediaAsyncFileUtil;
19 // This is delegate interface to inject the MTP device file system in Chrome OS
21 class MTPFileSystemBackendDelegate : public FileSystemBackendDelegate {
23 explicit MTPFileSystemBackendDelegate(
24 const base::FilePath& storage_partition_path);
25 virtual ~MTPFileSystemBackendDelegate();
27 // FileSystemBackendDelegate overrides.
28 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
29 fileapi::FileSystemType type) OVERRIDE;
30 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
31 const fileapi::FileSystemURL& url,
33 const base::Time& expected_modification_time,
34 fileapi::FileSystemContext* context) OVERRIDE;
35 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter(
36 const fileapi::FileSystemURL& url,
38 fileapi::FileSystemContext* context) OVERRIDE;
41 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_;
43 DISALLOW_COPY_AND_ASSIGN(MTPFileSystemBackendDelegate);
46 } // namespace chromeos
48 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_