OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" | 9 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 class FilePath; | 12 class FilePath; |
13 } // namespace base | 13 } // namespace base |
14 | 14 |
| 15 namespace fileapi { |
| 16 class AsyncFileUtil; |
| 17 class FileSystemContext; |
| 18 class FileSystemURL; |
| 19 class FileStreamWriter; |
| 20 class WatcherManager; |
| 21 } // namespace fileapi |
| 22 |
| 23 namespace webkit_blob { |
| 24 class FileStreamReader; |
| 25 } // namespace webkit_blob |
| 26 |
15 class DeviceMediaAsyncFileUtil; | 27 class DeviceMediaAsyncFileUtil; |
16 | 28 |
17 namespace chromeos { | 29 namespace chromeos { |
18 | 30 |
19 // This is delegate interface to inject the MTP device file system in Chrome OS | 31 // This is delegate interface to inject the MTP device file system in Chrome OS |
20 // file API backend. | 32 // file API backend. |
21 class MTPFileSystemBackendDelegate : public FileSystemBackendDelegate { | 33 class MTPFileSystemBackendDelegate : public FileSystemBackendDelegate { |
22 public: | 34 public: |
23 explicit MTPFileSystemBackendDelegate( | 35 explicit MTPFileSystemBackendDelegate( |
24 const base::FilePath& storage_partition_path); | 36 const base::FilePath& storage_partition_path); |
25 virtual ~MTPFileSystemBackendDelegate(); | 37 virtual ~MTPFileSystemBackendDelegate(); |
26 | 38 |
27 // FileSystemBackendDelegate overrides. | 39 // FileSystemBackendDelegate overrides. |
28 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( | 40 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( |
29 fileapi::FileSystemType type) OVERRIDE; | 41 fileapi::FileSystemType type) OVERRIDE; |
30 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( | 42 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( |
31 const fileapi::FileSystemURL& url, | 43 const fileapi::FileSystemURL& url, |
32 int64 offset, | 44 int64 offset, |
33 const base::Time& expected_modification_time, | 45 const base::Time& expected_modification_time, |
34 fileapi::FileSystemContext* context) OVERRIDE; | 46 fileapi::FileSystemContext* context) OVERRIDE; |
35 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter( | 47 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter( |
36 const fileapi::FileSystemURL& url, | 48 const fileapi::FileSystemURL& url, |
37 int64 offset, | 49 int64 offset, |
38 fileapi::FileSystemContext* context) OVERRIDE; | 50 fileapi::FileSystemContext* context) OVERRIDE; |
| 51 virtual fileapi::WatcherManager* GetWatcherManager( |
| 52 const fileapi::FileSystemURL& url) OVERRIDE; |
39 | 53 |
40 private: | 54 private: |
41 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_; | 55 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_; |
42 | 56 |
43 DISALLOW_COPY_AND_ASSIGN(MTPFileSystemBackendDelegate); | 57 DISALLOW_COPY_AND_ASSIGN(MTPFileSystemBackendDelegate); |
44 }; | 58 }; |
45 | 59 |
46 } // namespace chromeos | 60 } // namespace chromeos |
47 | 61 |
48 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 62 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
OLD | NEW |