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_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <queue> | 10 #include <queue> |
9 | 11 |
10 #include "base/callback.h" | 12 #include "base/callback.h" |
11 #include "base/files/file.h" | 13 #include "base/files/file.h" |
12 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
15 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
16 #include "base/win/scoped_comptr.h" | 19 #include "base/win/scoped_comptr.h" |
17 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" | 20 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" |
18 #include "storage/browser/fileapi/async_file_util.h" | 21 #include "storage/browser/fileapi/async_file_util.h" |
19 | 22 |
20 namespace base { | 23 namespace base { |
21 class FilePath; | 24 class FilePath; |
22 class SequencedTaskRunner; | 25 class SequencedTaskRunner; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 const ReadDirectorySuccessCallback& success_callback, | 108 const ReadDirectorySuccessCallback& success_callback, |
106 const ErrorCallback& error_callback) override; | 109 const ErrorCallback& error_callback) override; |
107 void CreateSnapshotFile( | 110 void CreateSnapshotFile( |
108 const base::FilePath& device_file_path, | 111 const base::FilePath& device_file_path, |
109 const base::FilePath& local_path, | 112 const base::FilePath& local_path, |
110 const CreateSnapshotFileSuccessCallback& success_callback, | 113 const CreateSnapshotFileSuccessCallback& success_callback, |
111 const ErrorCallback& error_callback) override; | 114 const ErrorCallback& error_callback) override; |
112 bool IsStreaming() override; | 115 bool IsStreaming() override; |
113 void ReadBytes(const base::FilePath& device_file_path, | 116 void ReadBytes(const base::FilePath& device_file_path, |
114 const scoped_refptr<net::IOBuffer>& buf, | 117 const scoped_refptr<net::IOBuffer>& buf, |
115 int64 offset, | 118 int64_t offset, |
116 int buf_len, | 119 int buf_len, |
117 const ReadBytesSuccessCallback& success_callback, | 120 const ReadBytesSuccessCallback& success_callback, |
118 const ErrorCallback& error_callback) override; | 121 const ErrorCallback& error_callback) override; |
119 bool IsReadOnly() const override; | 122 bool IsReadOnly() const override; |
120 void CopyFileLocal( | 123 void CopyFileLocal( |
121 const base::FilePath& source_file_path, | 124 const base::FilePath& source_file_path, |
122 const base::FilePath& device_file_path, | 125 const base::FilePath& device_file_path, |
123 const CreateTemporaryFileCallback& create_temporary_file_callback, | 126 const CreateTemporaryFileCallback& create_temporary_file_callback, |
124 const CopyFileProgressCallback& progress_callback, | 127 const CopyFileProgressCallback& progress_callback, |
125 const CopyFileLocalSuccessCallback& success_callback, | 128 const CopyFileLocalSuccessCallback& success_callback, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 // Used to make sure only one task is in progress at any time. | 259 // Used to make sure only one task is in progress at any time. |
257 bool task_in_progress_; | 260 bool task_in_progress_; |
258 | 261 |
259 // For callbacks that may run after destruction. | 262 // For callbacks that may run after destruction. |
260 base::WeakPtrFactory<MTPDeviceDelegateImplWin> weak_ptr_factory_; | 263 base::WeakPtrFactory<MTPDeviceDelegateImplWin> weak_ptr_factory_; |
261 | 264 |
262 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplWin); | 265 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplWin); |
263 }; | 266 }; |
264 | 267 |
265 #endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ | 268 #endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ |
OLD | NEW |