Rename GetIconID to GetIconId
[chromium-blink-merge.git] / chrome / browser / android / download / android_download_manager_overwrite_infobar_delegate.h
blobc36d4a7acca2ae8f6ab2f00369de686ee1b988ca
1 // Copyright 2015 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.
5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_ANDROID_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_ANDROID_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE_H_
8 #include "base/android/jni_weak_ref.h"
9 #include "base/android/scoped_java_ref.h"
10 #include "base/callback.h"
11 #include "base/files/file_path.h"
12 #include "chrome/browser/android/download/download_overwrite_infobar_delegate.h"
13 #include "components/infobars/core/infobar_delegate.h"
15 class InfoBarService;
17 namespace chrome {
18 namespace android {
20 // An infobar delegate that is initiated from Java side.
21 class AndroidDownloadManagerOverwriteInfoBarDelegate
22 : public DownloadOverwriteInfoBarDelegate {
23 public:
24 ~AndroidDownloadManagerOverwriteInfoBarDelegate() override;
26 static void Create(InfoBarService* infobar_service,
27 const std::string& file_name,
28 const std::string& dir_name,
29 const std::string& dir_full_path,
30 jobject chrome_download_delegate,
31 jobject download_info);
33 private:
34 AndroidDownloadManagerOverwriteInfoBarDelegate(
35 const std::string& file_name,
36 const std::string& dir_name,
37 const std::string& dir_full_path,
38 jobject chrome_download_delegate,
39 jobject download_info);
41 // DownloadOverwriteInfoBarDelegate:
42 void OverwriteExistingFile() override;
43 void CreateNewFile() override;
44 std::string GetFileName() const override;
45 std::string GetDirName() const override;
46 std::string GetDirFullPath() const override;
48 std::string file_name_;
49 std::string dir_name_;
50 std::string dir_full_path_;
51 base::android::ScopedJavaGlobalRef<jobject> chrome_download_delegate_;
52 base::android::ScopedJavaGlobalRef<jobject> download_info_;
54 DISALLOW_COPY_AND_ASSIGN(AndroidDownloadManagerOverwriteInfoBarDelegate);
57 } // namespace android
58 } // namespace chrome
60 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_ANDROID_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE_H_