OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 CHROME_BROWSER_ANDROID_DOWNLOAD_DUPLICATE_DOWNLOAD_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DUPLICATE_DOWNLOAD_INFOBAR_DELEGATE_H_ |
| 7 |
| 8 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 9 |
| 10 class InfoBarService; |
| 11 |
| 12 namespace chrome { |
| 13 namespace android { |
| 14 |
| 15 // An infobar that asks if user wants to continue downloading when there is |
| 16 // already a duplicate file in storage. If user chooses to proceed, |
| 17 // a new file will be created. |
| 18 // Note that this infobar does not expire if the user subsequently navigates, |
| 19 // since such navigations won't automatically cancel the underlying download. |
| 20 class DuplicateDownloadInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 21 public: |
| 22 // Gets the file path to be downloaded. |
| 23 virtual std::string GetFilePath() const = 0; |
| 24 |
| 25 // Whether the download is for offline page. |
| 26 virtual bool IsOfflinePage() const; |
| 27 |
| 28 virtual std::string GetPageURL() const; |
| 29 |
| 30 virtual bool IsOffTheRecord() const; |
| 31 |
| 32 // ConfirmInfoBarDelegate implementation. |
| 33 base::string16 GetMessageText() const override; |
| 34 bool ShouldExpire(const NavigationDetails& details) const override; |
| 35 }; |
| 36 |
| 37 } // namespace android |
| 38 } // namespace chrome |
| 39 |
| 40 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DUPLICATE_DOWNLOAD_INFOBAR_DELEGATE_H
_ |
OLD | NEW |