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

Side by Side Diff: chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "webkit/browser/fileapi/async_file_util.h" 11 #include "storage/browser/fileapi/async_file_util.h"
12 12
13 namespace base { 13 namespace base {
14 class FilePath; 14 class FilePath;
15 } 15 }
16 16
17 namespace net { 17 namespace net {
18 class IOBuffer; 18 class IOBuffer;
19 } 19 }
20 20
21 // Asynchronous delegate for media transfer protocol (MTP) device to perform 21 // Asynchronous delegate for media transfer protocol (MTP) device to perform
22 // media device file system operations. Class that implements this 22 // media device file system operations. Class that implements this
23 // delegate does the actual communication with the MTP device. 23 // delegate does the actual communication with the MTP device.
24 // The lifetime of the delegate is managed by the MTPDeviceMapService class. 24 // The lifetime of the delegate is managed by the MTPDeviceMapService class.
25 // Member functions and callbacks run on the IO thread. 25 // Member functions and callbacks run on the IO thread.
26 class MTPDeviceAsyncDelegate { 26 class MTPDeviceAsyncDelegate {
27 public: 27 public:
28 // A callback to be called when GetFileInfo method call succeeds. 28 // A callback to be called when GetFileInfo method call succeeds.
29 typedef base::Callback< 29 typedef base::Callback<
30 void(const base::File::Info& file_info)> GetFileInfoSuccessCallback; 30 void(const base::File::Info& file_info)> GetFileInfoSuccessCallback;
31 31
32 // A callback to be called when ReadDirectory method call succeeds. 32 // A callback to be called when ReadDirectory method call succeeds.
33 typedef base::Callback< 33 typedef base::Callback<
34 void(const fileapi::AsyncFileUtil::EntryList& file_list, 34 void(const storage::AsyncFileUtil::EntryList& file_list, bool has_more)>
35 bool has_more)> ReadDirectorySuccessCallback; 35 ReadDirectorySuccessCallback;
36 36
37 // A callback to be called when GetFileInfo/ReadDirectory/CreateSnapshot 37 // A callback to be called when GetFileInfo/ReadDirectory/CreateSnapshot
38 // method call fails. 38 // method call fails.
39 typedef base::Callback<void(base::File::Error error)> ErrorCallback; 39 typedef base::Callback<void(base::File::Error error)> ErrorCallback;
40 40
41 // A callback to be called when CreateSnapshotFile method call succeeds. 41 // A callback to be called when CreateSnapshotFile method call succeeds.
42 typedef base::Callback< 42 typedef base::Callback<
43 void(const base::File::Info& file_info, 43 void(const base::File::Info& file_info,
44 const base::FilePath& local_path)> CreateSnapshotFileSuccessCallback; 44 const base::FilePath& local_path)> CreateSnapshotFileSuccessCallback;
45 45
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 }; 114 };
115 115
116 typedef base::Callback<void(MTPDeviceAsyncDelegate*)> 116 typedef base::Callback<void(MTPDeviceAsyncDelegate*)>
117 CreateMTPDeviceAsyncDelegateCallback; 117 CreateMTPDeviceAsyncDelegateCallback;
118 118
119 void CreateMTPDeviceAsyncDelegate( 119 void CreateMTPDeviceAsyncDelegate(
120 const base::FilePath::StringType& device_location, 120 const base::FilePath::StringType& device_location,
121 const CreateMTPDeviceAsyncDelegateCallback& callback); 121 const CreateMTPDeviceAsyncDelegateCallback& callback);
122 122
123 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ 123 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698