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

Unified Diff: chrome/browser/ui/android/infobars/duplicate_download_infobar.h

Issue 2478583004: implementation for new duplicate download UI (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/infobars/duplicate_download_infobar.h
diff --git a/chrome/browser/ui/android/infobars/duplicate_download_infobar.h b/chrome/browser/ui/android/infobars/duplicate_download_infobar.h
new file mode 100644
index 0000000000000000000000000000000000000000..bdfc098f65cc14552a34d84f23821137cec94239
--- /dev/null
+++ b/chrome/browser/ui/android/infobars/duplicate_download_infobar.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_DUPLICATE_DOWNLOAD_INFOBAR_H_
+#define CHROME_BROWSER_UI_ANDROID_INFOBARS_DUPLICATE_DOWNLOAD_INFOBAR_H_
+
+#include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
+#include "chrome/browser/ui/android/infobars/infobar_android.h"
+
+namespace chrome {
+namespace android {
+class DuplicateDownloadInfoBarDelegate;
+}
+}
+
+// A native-side implementation of an infobar to ask whether to continue
+// downloading if target file already exists.
+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.
+ public:
+ static std::unique_ptr<infobars::InfoBar> CreateInfoBar(
+ std::unique_ptr<chrome::android::DuplicateDownloadInfoBarDelegate>
+ delegate);
+ ~DuplicateDownloadInfoBar() override;
+
+ private:
+ explicit DuplicateDownloadInfoBar(
+ std::unique_ptr<chrome::android::DuplicateDownloadInfoBarDelegate>
+ delegate);
+
+ // InfoBarAndroid:
+ base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar(
+ JNIEnv* env) override;
+ void ProcessButton(int action) override;
+
+ chrome::android::DuplicateDownloadInfoBarDelegate* GetDelegate();
+
+ DISALLOW_COPY_AND_ASSIGN(DuplicateDownloadInfoBar);
+};
+
+#endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_DUPLICATE_DOWNLOAD_INFOBAR_H_

Powered by Google App Engine
This is Rietveld 408576698