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_ANDROID_DOWNLOAD_MANAGER_DUPLICATE_INFOB AR_DELEGATE_H_ | |
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_ANDROID_DOWNLOAD_MANAGER_DUPLICATE_INFOB AR_DELEGATE_H_ | |
7 | |
8 #include "base/android/scoped_java_ref.h" | |
9 #include "base/macros.h" | |
10 #include "chrome/browser/android/download/duplicate_download_infobar_delegate.h" | |
11 #include "components/infobars/core/infobar_delegate.h" | |
12 | |
13 class InfoBarService; | |
14 | |
15 namespace chrome { | |
16 namespace android { | |
17 | |
gone
2016/11/07 19:45:55
Add a comment describing what the infobar is actua
qinmin
2016/11/08 00:30:50
Done.
| |
18 // An infobar delegate that is initiated from Java side. | |
19 class AndroidDownloadManagerDuplicateInfoBarDelegate | |
20 : public DuplicateDownloadInfoBarDelegate { | |
21 public: | |
22 ~AndroidDownloadManagerDuplicateInfoBarDelegate() override; | |
23 | |
24 static void Create(InfoBarService* infobar_service, | |
25 const std::string& file_path, | |
26 jobject chrome_download_delegate, | |
27 jobject download_info); | |
28 | |
29 private: | |
30 AndroidDownloadManagerDuplicateInfoBarDelegate( | |
31 const std::string& file_path, | |
32 jobject chrome_download_delegate, | |
33 jobject download_info); | |
34 | |
35 // DownloadOverwriteInfoBarDelegate: | |
36 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | |
37 bool Download() override; | |
38 bool Cancel() override; | |
39 std::string GetFilePath() const override; | |
40 | |
41 std::string file_path_; | |
42 base::android::ScopedJavaGlobalRef<jobject> chrome_download_delegate_; | |
43 base::android::ScopedJavaGlobalRef<jobject> download_info_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(AndroidDownloadManagerDuplicateInfoBarDelegate); | |
46 }; | |
47 | |
48 } // namespace android | |
49 } // namespace chrome | |
50 | |
51 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_ANDROID_DOWNLOAD_MANAGER_DUPLICATE_IN FOBAR_DELEGATE_H_ | |
OLD | NEW |