| 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_FILE_SYSTEM_PROVIDER_FILEAPI_BACKEND_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_BACKEND_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_BACKEND_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_BACKEND_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/file_util.h" |
| 9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" | 11 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" |
| 11 | 12 |
| 12 namespace fileapi { | 13 namespace fileapi { |
| 13 class AsyncFileUtil; | 14 class AsyncFileUtil; |
| 15 class FileSystemContext; |
| 16 class FileSystemURL; |
| 17 class FileStreamWriter; |
| 18 class WatcherManager; |
| 14 } // namespace fileapi | 19 } // namespace fileapi |
| 15 | 20 |
| 21 namespace webkit_blob { |
| 22 class FileStreamReader; |
| 23 } // namespace webkit_blob |
| 24 |
| 16 namespace chromeos { | 25 namespace chromeos { |
| 17 namespace file_system_provider { | 26 namespace file_system_provider { |
| 18 | 27 |
| 19 // Delegate implementation of the some methods in chromeos::FileSystemBackend | 28 // Delegate implementation of the some methods in chromeos::FileSystemBackend |
| 20 // for provided file systems. | 29 // for provided file systems. |
| 21 class BackendDelegate : public chromeos::FileSystemBackendDelegate { | 30 class BackendDelegate : public chromeos::FileSystemBackendDelegate { |
| 22 public: | 31 public: |
| 23 BackendDelegate(); | 32 BackendDelegate(); |
| 24 virtual ~BackendDelegate(); | 33 virtual ~BackendDelegate(); |
| 25 | 34 |
| 26 // FileSystemBackend::Delegate overrides. | 35 // FileSystemBackend::Delegate overrides. |
| 27 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(fileapi::FileSystemType type) | 36 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(fileapi::FileSystemType type) |
| 28 OVERRIDE; | 37 OVERRIDE; |
| 29 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( | 38 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( |
| 30 const fileapi::FileSystemURL& url, | 39 const fileapi::FileSystemURL& url, |
| 31 int64 offset, | 40 int64 offset, |
| 32 const base::Time& expected_modification_time, | 41 const base::Time& expected_modification_time, |
| 33 fileapi::FileSystemContext* context) OVERRIDE; | 42 fileapi::FileSystemContext* context) OVERRIDE; |
| 34 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter( | 43 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter( |
| 35 const fileapi::FileSystemURL& url, | 44 const fileapi::FileSystemURL& url, |
| 36 int64 offset, | 45 int64 offset, |
| 37 fileapi::FileSystemContext* context) OVERRIDE; | 46 fileapi::FileSystemContext* context) OVERRIDE; |
| 47 virtual fileapi::WatcherManager* GetWatcherManager( |
| 48 const fileapi::FileSystemURL& url) OVERRIDE; |
| 38 | 49 |
| 39 private: | 50 private: |
| 40 scoped_ptr<fileapi::AsyncFileUtil> async_file_util_; | 51 scoped_ptr<fileapi::AsyncFileUtil> async_file_util_; |
| 41 | 52 |
| 42 DISALLOW_COPY_AND_ASSIGN(BackendDelegate); | 53 DISALLOW_COPY_AND_ASSIGN(BackendDelegate); |
| 43 }; | 54 }; |
| 44 | 55 |
| 45 } // namespace file_system_provider | 56 } // namespace file_system_provider |
| 46 } // namespace chromeos | 57 } // namespace chromeos |
| 47 | 58 |
| 48 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_BACKEND_DELEGATE
_H_ | 59 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_BACKEND_DELEGATE
_H_ |
| OLD | NEW |