OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_CHILD_FILEAPI_FILE_SYSTEM_DISPATCHER_H_ | 5 #ifndef CONTENT_CHILD_FILEAPI_FILE_SYSTEM_DISPATCHER_H_ |
6 #define CONTENT_CHILD_FILEAPI_FILE_SYSTEM_DISPATCHER_H_ | 6 #define CONTENT_CHILD_FILEAPI_FILE_SYSTEM_DISPATCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 int* request_id_out, | 119 int* request_id_out, |
120 const WriteCallback& success_callback, | 120 const WriteCallback& success_callback, |
121 const StatusCallback& error_callback); | 121 const StatusCallback& error_callback); |
122 void Cancel(int request_id_to_cancel, | 122 void Cancel(int request_id_to_cancel, |
123 const StatusCallback& callback); | 123 const StatusCallback& callback); |
124 void TouchFile(const GURL& file_path, | 124 void TouchFile(const GURL& file_path, |
125 const base::Time& last_access_time, | 125 const base::Time& last_access_time, |
126 const base::Time& last_modified_time, | 126 const base::Time& last_modified_time, |
127 const StatusCallback& callback); | 127 const StatusCallback& callback); |
128 | 128 |
| 129 // This returns a raw open PlatformFile, unlike the above, which are |
| 130 // self-contained operations. |
| 131 void OpenPepperFile(const GURL& file_path, |
| 132 int pp_open_flags, |
| 133 const OpenFileCallback& success_callback, |
| 134 const StatusCallback& error_callback); |
| 135 // This must be paired with OpenFile, and called after finished using the |
| 136 // raw PlatformFile returned from OpenFile. |
| 137 void NotifyCloseFile(int file_open_id); |
| 138 |
129 // The caller must send FileSystemHostMsg_DidReceiveSnapshot message | 139 // The caller must send FileSystemHostMsg_DidReceiveSnapshot message |
130 // with |request_id| passed to |success_callback| after the snapshot file | 140 // with |request_id| passed to |success_callback| after the snapshot file |
131 // is successfully received. | 141 // is successfully received. |
132 void CreateSnapshotFile(const GURL& file_path, | 142 void CreateSnapshotFile(const GURL& file_path, |
133 const CreateSnapshotFileCallback& success_callback, | 143 const CreateSnapshotFileCallback& success_callback, |
134 const StatusCallback& error_callback); | 144 const StatusCallback& error_callback); |
135 | 145 |
136 private: | 146 private: |
137 class CallbackDispatcher; | 147 class CallbackDispatcher; |
138 | 148 |
(...skipping 23 matching lines...) Expand all Loading... |
162 quota::QuotaLimitType quota_policy); | 172 quota::QuotaLimitType quota_policy); |
163 | 173 |
164 IDMap<CallbackDispatcher, IDMapOwnPointer> dispatchers_; | 174 IDMap<CallbackDispatcher, IDMapOwnPointer> dispatchers_; |
165 | 175 |
166 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); | 176 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); |
167 }; | 177 }; |
168 | 178 |
169 } // namespace content | 179 } // namespace content |
170 | 180 |
171 #endif // CONTENT_CHILD_FILEAPI_FILE_SYSTEM_DISPATCHER_H_ | 181 #endif // CONTENT_CHILD_FILEAPI_FILE_SYSTEM_DISPATCHER_H_ |
OLD | NEW |