OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_MEDIA_GALLERIES_FILEAPI_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
11 #include "webkit/fileapi/async_file_util.h" | 11 #include "webkit/fileapi/async_file_util.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
| 14 class SequencedTaskRunner; |
14 class Time; | 15 class Time; |
15 } | 16 } |
16 | 17 |
17 namespace fileapi { | 18 namespace fileapi { |
18 class FileSystemOperationContext; | 19 class FileSystemOperationContext; |
19 class FileSystemURL; | 20 class FileSystemURL; |
20 } | 21 } |
21 | 22 |
22 namespace chrome { | 23 namespace chrome { |
23 | 24 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 void OnReadDirectoryError( | 136 void OnReadDirectoryError( |
136 const AsyncFileUtil::ReadDirectoryCallback& callback, | 137 const AsyncFileUtil::ReadDirectoryCallback& callback, |
137 base::PlatformFileError error); | 138 base::PlatformFileError error); |
138 | 139 |
139 // Called when the snapshot file specified by the |platform_path| is | 140 // Called when the snapshot file specified by the |platform_path| is |
140 // successfully created. |file_info| contains the device media file details | 141 // successfully created. |file_info| contains the device media file details |
141 // for which the snapshot file is created. |callback| is invoked to complete | 142 // for which the snapshot file is created. |callback| is invoked to complete |
142 // the CreateSnapshotFile request. | 143 // the CreateSnapshotFile request. |
143 void OnDidCreateSnapshotFile( | 144 void OnDidCreateSnapshotFile( |
144 const AsyncFileUtil::CreateSnapshotFileCallback& callback, | 145 const AsyncFileUtil::CreateSnapshotFileCallback& callback, |
| 146 base::SequencedTaskRunner* media_task_runner, |
145 const base::PlatformFileInfo& file_info, | 147 const base::PlatformFileInfo& file_info, |
146 const base::FilePath& platform_path); | 148 const base::FilePath& platform_path); |
147 | 149 |
148 // Called when CreateSnapshotFile method call fails. |callback| is invoked to | 150 // Called when CreateSnapshotFile method call fails. |callback| is invoked to |
149 // notify the caller about the |error|. | 151 // notify the caller about the |error|. |
150 void OnCreateSnapshotFileError( | 152 void OnCreateSnapshotFileError( |
151 const AsyncFileUtil::CreateSnapshotFileCallback& callback, | 153 const AsyncFileUtil::CreateSnapshotFileCallback& callback, |
152 base::PlatformFileError error); | 154 base::PlatformFileError error); |
153 | 155 |
154 // Called when the snapshot file specified by the |snapshot_file_path| is | 156 // Called when the snapshot file specified by the |snapshot_file_path| is |
(...skipping 13 matching lines...) Expand all Loading... |
168 | 170 |
169 // For callbacks that may run after destruction. | 171 // For callbacks that may run after destruction. |
170 base::WeakPtrFactory<DeviceMediaAsyncFileUtil> weak_ptr_factory_; | 172 base::WeakPtrFactory<DeviceMediaAsyncFileUtil> weak_ptr_factory_; |
171 | 173 |
172 DISALLOW_COPY_AND_ASSIGN(DeviceMediaAsyncFileUtil); | 174 DISALLOW_COPY_AND_ASSIGN(DeviceMediaAsyncFileUtil); |
173 }; | 175 }; |
174 | 176 |
175 } // namespace chrome | 177 } // namespace chrome |
176 | 178 |
177 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_DEVICE_MEDIA_ASYNC_FILE_UTIL_H
_ | 179 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_DEVICE_MEDIA_ASYNC_FILE_UTIL_H
_ |
OLD | NEW |