| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_DELEGATE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 | 10 |
| 11 class CONTENT_EXPORT DownloadStatusUpdaterDelegate { | 11 class CONTENT_EXPORT DownloadStatusUpdaterDelegate { |
| 12 public: | 12 public: |
| 13 // Returns true if the progress is known (i.e. we know the final size | 13 // Returns true if the progress is known (i.e. we know the final size |
| 14 // of all downloads). | 14 // of all downloads). |
| 15 virtual bool IsDownloadProgressKnown() = 0; | 15 virtual bool IsDownloadProgressKnown() const = 0; |
| 16 | 16 |
| 17 // Returns the number of downloads that are in progress. | 17 // Returns the number of downloads that are in progress. |
| 18 virtual int64 GetInProgressDownloadCount() = 0; | 18 virtual int64 GetInProgressDownloadCount() const = 0; |
| 19 | 19 |
| 20 // Returns the amount of received data, in bytes. | 20 // Returns the amount of received data, in bytes. |
| 21 virtual int64 GetReceivedDownloadBytes() = 0; | 21 virtual int64 GetReceivedDownloadBytes() const = 0; |
| 22 | 22 |
| 23 // Returns the final size of all downloads, in bytes. | 23 // Returns the final size of all downloads, in bytes. |
| 24 virtual int64 GetTotalDownloadBytes() = 0; | 24 virtual int64 GetTotalDownloadBytes() const = 0; |
| 25 | 25 |
| 26 protected: | 26 protected: |
| 27 virtual ~DownloadStatusUpdaterDelegate() {} | 27 virtual ~DownloadStatusUpdaterDelegate() {} |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_DELEGATE_H_ | 30 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATUS_UPDATER_DELEGATE_H_ |
| OLD | NEW |