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

Unified Diff: chrome/browser/android/download/android_download_manager_duplicate_infobar_delegate.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/android/download/android_download_manager_duplicate_infobar_delegate.h
diff --git a/chrome/browser/android/download/android_download_manager_duplicate_infobar_delegate.h b/chrome/browser/android/download/android_download_manager_duplicate_infobar_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..ecc3b5d96dd2213f1f898e73c3dffa8c90d72331
--- /dev/null
+++ b/chrome/browser/android/download/android_download_manager_duplicate_infobar_delegate.h
@@ -0,0 +1,51 @@
+// 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_ANDROID_DOWNLOAD_ANDROID_DOWNLOAD_MANAGER_DUPLICATE_INFOBAR_DELEGATE_H_
+#define CHROME_BROWSER_ANDROID_DOWNLOAD_ANDROID_DOWNLOAD_MANAGER_DUPLICATE_INFOBAR_DELEGATE_H_
+
+#include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
+#include "chrome/browser/android/download/duplicate_download_infobar_delegate.h"
+#include "components/infobars/core/infobar_delegate.h"
+
+class InfoBarService;
+
+namespace chrome {
+namespace android {
+
gone 2016/11/07 19:45:55 Add a comment describing what the infobar is actua
qinmin 2016/11/08 00:30:50 Done.
+// An infobar delegate that is initiated from Java side.
+class AndroidDownloadManagerDuplicateInfoBarDelegate
+ : public DuplicateDownloadInfoBarDelegate {
+ public:
+ ~AndroidDownloadManagerDuplicateInfoBarDelegate() override;
+
+ static void Create(InfoBarService* infobar_service,
+ const std::string& file_path,
+ jobject chrome_download_delegate,
+ jobject download_info);
+
+ private:
+ AndroidDownloadManagerDuplicateInfoBarDelegate(
+ const std::string& file_path,
+ jobject chrome_download_delegate,
+ jobject download_info);
+
+ // DownloadOverwriteInfoBarDelegate:
+ infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
+ bool Download() override;
+ bool Cancel() override;
+ std::string GetFilePath() const override;
+
+ std::string file_path_;
+ base::android::ScopedJavaGlobalRef<jobject> chrome_download_delegate_;
+ base::android::ScopedJavaGlobalRef<jobject> download_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(AndroidDownloadManagerDuplicateInfoBarDelegate);
+};
+
+} // namespace android
+} // namespace chrome
+
+#endif // CHROME_BROWSER_ANDROID_DOWNLOAD_ANDROID_DOWNLOAD_MANAGER_DUPLICATE_INFOBAR_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698