Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: webkit/fileapi/media/device_media_async_file_util.h

Issue 12703012: Have media gallery (through native media file util) use MIME sniffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed "which thread" errors. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ 5 #ifndef WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_
6 #define WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ 6 #define WEBKIT_FILEAPI_MEDIA_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"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 // Called when ReadDirectory method call failed to enumerate the directory 132 // Called when ReadDirectory method call failed to enumerate the directory
133 // objects. |callback| is invoked to notify the caller about the |error| 133 // objects. |callback| is invoked to notify the caller about the |error|
134 // that occured while reading the directory objects. 134 // that occured while reading the directory objects.
135 void OnReadDirectoryError( 135 void OnReadDirectoryError(
136 const AsyncFileUtil::ReadDirectoryCallback& callback, 136 const AsyncFileUtil::ReadDirectoryCallback& callback,
137 base::PlatformFileError error); 137 base::PlatformFileError error);
138 138
139 // Called when the snapshot file specified by the |platform_path| is 139 // Called when the snapshot file specified by the |platform_path| is
140 // successfully created. |file_info| contains the device media file details 140 // successfully created. |file_info| contains the device media file details
141 // for which the snapshot file is created. |callback| is invoked to complete 141 // for which the snapshot file is created.
142 // the CreateSnapshotFile request.
143 void OnDidCreateSnapshotFile( 142 void OnDidCreateSnapshotFile(
143 FileSystemOperationContext* context,
144 const AsyncFileUtil::CreateSnapshotFileCallback& callback, 144 const AsyncFileUtil::CreateSnapshotFileCallback& callback,
145 const base::PlatformFileInfo& file_info, 145 const base::PlatformFileInfo& file_info,
146 const base::FilePath& platform_path); 146 const base::FilePath& platform_path);
147 147
148 // Called after OnDidCreateSnapshotFile finishes media check.
149 // |callback| is invoked to complete the CreateSnapshotFile request.
150 // It is called with |*p_error| regardless of result.
151 void OnDidCheckMediaRunTask(
152 const AsyncFileUtil::CreateSnapshotFileCallback& callback,
153 const base::PlatformFileInfo& file_info,
154 const base::FilePath& platform_path,
155 base::PlatformFileError* p_error);
156
148 // Called when CreateSnapshotFile method call fails. |callback| is invoked to 157 // Called when CreateSnapshotFile method call fails. |callback| is invoked to
149 // notify the caller about the |error|. 158 // notify the caller about the |error|.
150 void OnCreateSnapshotFileError( 159 void OnCreateSnapshotFileError(
151 const AsyncFileUtil::CreateSnapshotFileCallback& callback, 160 const AsyncFileUtil::CreateSnapshotFileCallback& callback,
152 base::PlatformFileError error); 161 base::PlatformFileError error);
153 162
154 // Called when the snapshot file specified by the |snapshot_file_path| is 163 // Called when the snapshot file specified by the |snapshot_file_path| is
155 // created to hold the contents of the |device_file_path|. If the snapshot 164 // created to hold the contents of the |device_file_path|. If the snapshot
156 // file is successfully created, |snapshot_file_path| will be an non-empty 165 // file is successfully created, |snapshot_file_path| will be an non-empty
157 // file path. In case of failure, |snapshot_file_path| will be an empty file 166 // file path. In case of failure, |snapshot_file_path| will be an empty file
(...skipping 10 matching lines...) Expand all
168 177
169 // For callbacks that may run after destruction. 178 // For callbacks that may run after destruction.
170 base::WeakPtrFactory<DeviceMediaAsyncFileUtil> weak_ptr_factory_; 179 base::WeakPtrFactory<DeviceMediaAsyncFileUtil> weak_ptr_factory_;
171 180
172 DISALLOW_COPY_AND_ASSIGN(DeviceMediaAsyncFileUtil); 181 DISALLOW_COPY_AND_ASSIGN(DeviceMediaAsyncFileUtil);
173 }; 182 };
174 183
175 } // namespace fileapi 184 } // namespace fileapi
176 185
177 #endif // WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ 186 #endif // WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698