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

Side by Side Diff: chrome/browser/android/download/duplicate_download_infobar_delegate.h

Issue 2478583004: implementation for new duplicate download UI (Closed)
Patch Set: do null check on webcontents Created 4 years, 1 month 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
(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 _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698