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

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

Issue 2453633006: [downloads] Move platform specific code out of DownloadTargetDeterminer. (Closed)
Patch Set: . Created 3 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_ANDROID_DOWNLOAD_CHROME_DUPLICATE_DOWNLOAD_INFOBAR_DELEGA TE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_CHROME_DUPLICATE_DOWNLOAD_INFOBAR_DELEGA TE_H_
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_CHROME_DUPLICATE_DOWNLOAD_INFOBAR_DELEGA TE_H_ 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_CHROME_DUPLICATE_DOWNLOAD_INFOBAR_DELEGA TE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 11 matching lines...) Expand all
22 class ChromeDuplicateDownloadInfoBarDelegate 22 class ChromeDuplicateDownloadInfoBarDelegate
23 : public DuplicateDownloadInfoBarDelegate, 23 : public DuplicateDownloadInfoBarDelegate,
24 public content::DownloadItem::Observer { 24 public content::DownloadItem::Observer {
25 public: 25 public:
26 ~ChromeDuplicateDownloadInfoBarDelegate() override; 26 ~ChromeDuplicateDownloadInfoBarDelegate() override;
27 27
28 static void Create( 28 static void Create(
29 InfoBarService* infobar_service, 29 InfoBarService* infobar_service,
30 content::DownloadItem* download_item, 30 content::DownloadItem* download_item,
31 const base::FilePath& file_path, 31 const base::FilePath& file_path,
32 const DownloadTargetDeterminerDelegate::FileSelectedCallback& 32 const DownloadTargetDeterminerDelegate::ConfirmationCallback&
33 file_selected_callback); 33 file_selected_callback);
34 34
35 // content::DownloadItem::Observer 35 // content::DownloadItem::Observer
36 void OnDownloadDestroyed(content::DownloadItem* download_item) override; 36 void OnDownloadDestroyed(content::DownloadItem* download_item) override;
37 37
38 private: 38 private:
39 ChromeDuplicateDownloadInfoBarDelegate( 39 ChromeDuplicateDownloadInfoBarDelegate(
40 content::DownloadItem* download_item, 40 content::DownloadItem* download_item,
41 const base::FilePath& file_path, 41 const base::FilePath& file_path,
42 const DownloadTargetDeterminerDelegate::FileSelectedCallback& callback); 42 const DownloadTargetDeterminerDelegate::ConfirmationCallback& callback);
43 43
44 // DownloadOverwriteInfoBarDelegate: 44 // DownloadOverwriteInfoBarDelegate:
45 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; 45 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
46 bool Accept() override; 46 bool Accept() override;
47 bool Cancel() override; 47 bool Cancel() override;
48 std::string GetFilePath() const override; 48 std::string GetFilePath() const override;
49 void InfoBarDismissed() override; 49 void InfoBarDismissed() override;
50 bool IsOffTheRecord() const override; 50 bool IsOffTheRecord() const override;
51 51
52 52
53 // The download item that is requesting the infobar. Could get deleted while 53 // The download item that is requesting the infobar. Could get deleted while
54 // the infobar is showing. 54 // the infobar is showing.
55 content::DownloadItem* download_item_; 55 content::DownloadItem* download_item_;
56 56
57 // The target file path to be downloaded. This is used to show users the 57 // The target file path to be downloaded. This is used to show users the
58 // file name that will be used. 58 // file name that will be used.
59 base::FilePath file_path_; 59 base::FilePath file_path_;
60 60
61 // Whether the download is off the record. 61 // Whether the download is off the record.
62 bool is_off_the_record_; 62 bool is_off_the_record_;
63 63
64 // A callback to download target determiner to notify that file selection 64 // A callback to download target determiner to notify that file selection
65 // is made (or cancelled). 65 // is made (or cancelled).
66 DownloadTargetDeterminerDelegate::FileSelectedCallback 66 DownloadTargetDeterminerDelegate::ConfirmationCallback
67 file_selected_callback_; 67 file_selected_callback_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(ChromeDuplicateDownloadInfoBarDelegate); 69 DISALLOW_COPY_AND_ASSIGN(ChromeDuplicateDownloadInfoBarDelegate);
70 }; 70 };
71 71
72 } // namespace android 72 } // namespace android
73 } // namespace chrome 73 } // namespace chrome
74 74
75 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_CHROME_DUPLICATE_DOWNLOAD_INFOBAR_DEL EGATE_H_ 75 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_CHROME_DUPLICATE_DOWNLOAD_INFOBAR_DEL EGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/download/chrome_duplicate_download_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698