OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_DESTINATION_CONTROLLER_H_ | |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_DESTINATION_CONTROLLER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "content/public/browser/download_interrupt_reasons.h" | |
11 | |
12 namespace content { | |
13 | |
14 // Class that receives asynchronous events from a DownloadDestination | |
15 // about downloading progress and completion. These describe | |
16 // the process of writing the data to the final location (e.g. |bytes_so_far| is | |
17 // bytes_written, and |reason| is errors occuring on writing data). | |
benjhayden
2012/07/25 15:19:16
Then perhaps rename |bytes_so_far| to |bytes_writt
Randy Smith (Not in Mondays)
2012/07/30 01:07:23
Hmmm. What I was trying to express with this comm
| |
18 // | |
19 // All methods must be invoked on the UI thread. | |
20 // | |
21 // Note that this interface does not deal with cross-thread lifetime | |
22 // issues. | |
23 class DownloadDestinationController { | |
24 public: | |
25 virtual void DestinationUpdate(int64 bytes_so_far, | |
26 int64 bytes_per_sec, | |
27 const std::string& hash_state) = 0; | |
28 | |
29 virtual void DestinationError(DownloadInterruptReason reason) = 0; | |
30 | |
31 virtual void DestinationCompleted(const std::string& final_hash) = 0; | |
32 }; | |
33 | |
34 } // namespace content | |
35 | |
36 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_CONTROLLER_H_ | |
OLD | NEW |