OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include <stdint.h> |
| 9 |
9 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "storage/browser/fileapi/file_system_backend.h" | 12 #include "storage/browser/fileapi/file_system_backend.h" |
12 #include "storage/common/fileapi/file_system_types.h" | 13 #include "storage/common/fileapi/file_system_types.h" |
13 | 14 |
14 class GURL; | 15 class GURL; |
15 | 16 |
16 namespace base { | 17 namespace base { |
17 class Time; | 18 class Time; |
18 } // namespace base | 19 } // namespace base |
(...skipping 15 matching lines...) Expand all Loading... |
34 public: | 35 public: |
35 virtual ~FileSystemBackendDelegate() {} | 36 virtual ~FileSystemBackendDelegate() {} |
36 | 37 |
37 // Called from FileSystemBackend::GetAsyncFileUtil(). | 38 // Called from FileSystemBackend::GetAsyncFileUtil(). |
38 virtual storage::AsyncFileUtil* GetAsyncFileUtil( | 39 virtual storage::AsyncFileUtil* GetAsyncFileUtil( |
39 storage::FileSystemType type) = 0; | 40 storage::FileSystemType type) = 0; |
40 | 41 |
41 // Called from FileSystemBackend::CreateFileStreamReader(). | 42 // Called from FileSystemBackend::CreateFileStreamReader(). |
42 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( | 43 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( |
43 const storage::FileSystemURL& url, | 44 const storage::FileSystemURL& url, |
44 int64 offset, | 45 int64_t offset, |
45 int64 max_bytes_to_read, | 46 int64_t max_bytes_to_read, |
46 const base::Time& expected_modification_time, | 47 const base::Time& expected_modification_time, |
47 storage::FileSystemContext* context) = 0; | 48 storage::FileSystemContext* context) = 0; |
48 | 49 |
49 // Called from FileSystemBackend::CreateFileStreamWriter(). | 50 // Called from FileSystemBackend::CreateFileStreamWriter(). |
50 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( | 51 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( |
51 const storage::FileSystemURL& url, | 52 const storage::FileSystemURL& url, |
52 int64 offset, | 53 int64_t offset, |
53 storage::FileSystemContext* context) = 0; | 54 storage::FileSystemContext* context) = 0; |
54 | 55 |
55 // Called from the FileSystemWatcherService class. The returned pointer must | 56 // Called from the FileSystemWatcherService class. The returned pointer must |
56 // stay valid until shutdown. | 57 // stay valid until shutdown. |
57 virtual storage::WatcherManager* GetWatcherManager( | 58 virtual storage::WatcherManager* GetWatcherManager( |
58 storage::FileSystemType type) = 0; | 59 storage::FileSystemType type) = 0; |
59 | 60 |
60 // Called from FileSystemBackend::GetRedirectURLForContents. Please ensure | 61 // Called from FileSystemBackend::GetRedirectURLForContents. Please ensure |
61 // that the returned URL is secure to be opened in a browser tab, or referred | 62 // that the returned URL is secure to be opened in a browser tab, or referred |
62 // from <img>, <video>, XMLHttpRequest, etc... | 63 // from <img>, <video>, XMLHttpRequest, etc... |
63 virtual void GetRedirectURLForContents( | 64 virtual void GetRedirectURLForContents( |
64 const storage::FileSystemURL& url, | 65 const storage::FileSystemURL& url, |
65 const storage::URLCallback& callback) = 0; | 66 const storage::URLCallback& callback) = 0; |
66 }; | 67 }; |
67 | 68 |
68 } // namespace chromeos | 69 } // namespace chromeos |
69 | 70 |
70 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 71 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
OLD | NEW |