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_UI_ANDROID_INFOBARS_DUPLICATE_DOWNLOAD_INFOBAR_H_ | |
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_DUPLICATE_DOWNLOAD_INFOBAR_H_ | |
7 | |
8 #include "base/android/scoped_java_ref.h" | |
9 #include "base/macros.h" | |
10 #include "chrome/browser/ui/android/infobars/infobar_android.h" | |
11 | |
12 namespace chrome { | |
13 namespace android { | |
14 class DuplicateDownloadInfoBarDelegate; | |
15 } | |
16 } | |
17 | |
18 // A native-side implementation of an infobar to ask whether to continue | |
19 // downloading if target file already exists. | |
20 class DuplicateDownloadInfoBar : public InfoBarAndroid { | |
gone
2016/11/07 19:45:56
This should extend ConfimrInfoBar instead. It's p
qinmin
2016/11/08 00:30:50
Done.
| |
21 public: | |
22 static std::unique_ptr<infobars::InfoBar> CreateInfoBar( | |
23 std::unique_ptr<chrome::android::DuplicateDownloadInfoBarDelegate> | |
24 delegate); | |
25 ~DuplicateDownloadInfoBar() override; | |
26 | |
27 private: | |
28 explicit DuplicateDownloadInfoBar( | |
29 std::unique_ptr<chrome::android::DuplicateDownloadInfoBarDelegate> | |
30 delegate); | |
31 | |
32 // InfoBarAndroid: | |
33 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | |
34 JNIEnv* env) override; | |
35 void ProcessButton(int action) override; | |
36 | |
37 chrome::android::DuplicateDownloadInfoBarDelegate* GetDelegate(); | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(DuplicateDownloadInfoBar); | |
40 }; | |
41 | |
42 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_DUPLICATE_DOWNLOAD_INFOBAR_H_ | |
OLD | NEW |