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

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

Issue 2478583004: implementation for new duplicate download UI (Closed)
Patch Set: do null check on webcontents 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 unified diff | Download patch
OLDNEW
(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
18 // An infobar delegate that is initiated from Java side. This infobar is used
19 // when user tries to download an OMA DRM file that has already been downloaded.
20 class AndroidDownloadManagerDuplicateInfoBarDelegate
21 : public DuplicateDownloadInfoBarDelegate {
22 public:
23 ~AndroidDownloadManagerDuplicateInfoBarDelegate() override;
24
25 static void Create(InfoBarService* infobar_service,
26 const std::string& file_path,
27 jobject chrome_download_delegate,
28 jobject download_info,
29 jboolean is_off_the_record);
30
31 private:
32 AndroidDownloadManagerDuplicateInfoBarDelegate(
33 const std::string& file_path,
34 jobject chrome_download_delegate,
35 jobject download_info,
36 jboolean is_off_the_record);
37
38 // DownloadOverwriteInfoBarDelegate:
39 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
40 bool Accept() override;
41 bool Cancel() override;
42 std::string GetFilePath() const override;
43 bool IsOffTheRecord() const override;
44
45 std::string file_path_;
46 base::android::ScopedJavaGlobalRef<jobject> chrome_download_delegate_;
47 base::android::ScopedJavaGlobalRef<jobject> download_info_;
48 bool is_off_the_record_;
49
50 DISALLOW_COPY_AND_ASSIGN(AndroidDownloadManagerDuplicateInfoBarDelegate);
51 };
52
53 } // namespace android
54 } // namespace chrome
55
56 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_ANDROID_DOWNLOAD_MANAGER_DUPLICATE_IN FOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/download/android_download_manager_duplicate_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698