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

Side by Side Diff: chrome/browser/media_galleries/win/snapshot_file_details.h

Issue 14247034: Move Media Galleries FileAPI code out of webkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cr-14352004
Patch Set: Add android ifdef. Created 7 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_SNAPSHOT_FILE_DETAILS_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_WIN_SNAPSHOT_FILE_DETAILS_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_SNAPSHOT_FILE_DETAILS_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_SNAPSHOT_FILE_DETAILS_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/win/scoped_comptr.h" 10 #include "base/win/scoped_comptr.h"
11 #include "webkit/fileapi/media/mtp_device_async_delegate.h" 11 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h"
12 12
13 namespace chrome { 13 namespace chrome {
14 14
15 // Structure used to represent snapshot file request params. 15 // Structure used to represent snapshot file request params.
16 struct SnapshotRequestInfo { 16 struct SnapshotRequestInfo {
17 SnapshotRequestInfo( 17 SnapshotRequestInfo(
18 const base::FilePath& device_file_path, 18 const base::FilePath& device_file_path,
19 const base::FilePath& snapshot_file_path, 19 const base::FilePath& snapshot_file_path,
20 const fileapi::MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback& 20 const MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback&
21 success_callback, 21 success_callback,
22 const fileapi::MTPDeviceAsyncDelegate::ErrorCallback& error_callback); 22 const MTPDeviceAsyncDelegate::ErrorCallback& error_callback);
23 23
24 // Device file path. 24 // Device file path.
25 base::FilePath device_file_path; 25 base::FilePath device_file_path;
26 26
27 // Local platform path of the snapshot file. 27 // Local platform path of the snapshot file.
28 base::FilePath snapshot_file_path; 28 base::FilePath snapshot_file_path;
29 29
30 // A callback to be called when CreateSnapshotFile() succeeds. 30 // A callback to be called when CreateSnapshotFile() succeeds.
31 fileapi::MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback 31 MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback
32 success_callback; 32 success_callback;
33 33
34 // A callback to be called when CreateSnapshotFile() fails. 34 // A callback to be called when CreateSnapshotFile() fails.
35 fileapi::MTPDeviceAsyncDelegate::ErrorCallback error_callback; 35 MTPDeviceAsyncDelegate::ErrorCallback error_callback;
36 }; 36 };
37 37
38 // Provides the details for the the creation of snapshot file. 38 // Provides the details for the the creation of snapshot file.
39 class SnapshotFileDetails { 39 class SnapshotFileDetails {
40 public: 40 public:
41 explicit SnapshotFileDetails(const SnapshotRequestInfo& request_info); 41 explicit SnapshotFileDetails(const SnapshotRequestInfo& request_info);
42 ~SnapshotFileDetails(); 42 ~SnapshotFileDetails();
43 43
44 void set_file_info(const base::PlatformFileInfo& file_info); 44 void set_file_info(const base::PlatformFileInfo& file_info);
45 void set_device_file_stream(IStream* file_stream); 45 void set_device_file_stream(IStream* file_stream);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // during each IStream::Read() operation. 88 // during each IStream::Read() operation.
89 DWORD optimal_transfer_size_; 89 DWORD optimal_transfer_size_;
90 90
91 // Total number of bytes written into the snapshot file. 91 // Total number of bytes written into the snapshot file.
92 DWORD bytes_written_; 92 DWORD bytes_written_;
93 }; 93 };
94 94
95 } // namespace chrome 95 } // namespace chrome
96 96
97 #endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_SNAPSHOT_FILE_DETAILS_H_ 97 #endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_SNAPSHOT_FILE_DETAILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698