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

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

Issue 580043002: [Android] Prompt with infobar on filename conflict (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: avoided Java-only infobar Created 5 years, 9 months 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 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.
4
5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_OVERWRITE_INFOBAR_DELEGATE_JAVA _INITIATED_H_
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_OVERWRITE_INFOBAR_DELEGATE_JAVA _INITIATED_H_
7
8 #include "base/callback.h"
9 #include "base/files/file_path.h"
10 #include "chrome/browser/android/download/download_overwrite_info.h"
11 #include "chrome/browser/android/download/download_overwrite_infobar_delegate.h"
12 #include "components/infobars/core/infobar_delegate.h"
13
14 class InfoBarService;
15
16 namespace chrome {
17 namespace android {
18
19 // An infobar delegate that is initiated from Java side.
20 class DownloadOverwriteInfoBarDelegateJavaInitiated
Ted C 2015/02/26 00:57:56 The names of these two files is odd to me. Is the
Changwan Ryu 2015/03/02 14:46:36 Done.
21 : public DownloadOverwriteInfoBarDelegate {
22 public:
23 ~DownloadOverwriteInfoBarDelegateJavaInitiated() override;
24
25 typedef base::Callback<void(const DownloadOverwriteInfo&)>
Peter Kasting 2015/02/25 06:24:57 Typedefs go above members
Changwan Ryu 2015/03/02 14:46:36 I see. Removed now since the callback use case is
26 FileSelectedFromDownloadOverwriteInfoCallback;
Peter Kasting 2015/02/25 06:24:57 Nit: This name seems a bit verbose, can you shorte
Changwan Ryu 2015/03/02 14:46:36 Ditto
27
28 static void Create(InfoBarService* infobar_service,
29 const DownloadOverwriteInfo& info,
30 const FileSelectedFromDownloadOverwriteInfoCallback&
31 file_selected_callback);
32
33 void OverwriteExistingFile() override;
Peter Kasting 2015/02/25 06:24:57 Nit: "// DownloadOverwriteInfoBarDelegate:" How c
Changwan Ryu 2015/03/02 14:46:36 Done.
34 void CreateNewFile() override;
35 std::string GetFileName() const override;
36 std::string GetDirName() const override;
37 std::string GetDirFullPath() const override;
38
39 private:
40 DownloadOverwriteInfoBarDelegateJavaInitiated(
41 const DownloadOverwriteInfo& info,
42 const FileSelectedFromDownloadOverwriteInfoCallback& callback);
43
44 // infobars::InfoBarDelegateForDownloadOverwriteInfo:
Peter Kasting 2015/02/25 06:24:57 This is not a class name? And if you meant to wri
Changwan Ryu 2015/03/02 14:46:36 Done.
45 bool ShouldExpire(const infobars::InfoBarDelegate::NavigationDetails& details)
46 const override;
47 void InfoBarDismissed() override;
48
49 DownloadOverwriteInfo download_overwrite_info_;
50
51 // A callback to notify that file selection is made (or cancelled).
52 FileSelectedFromDownloadOverwriteInfoCallback file_selected_callback_;
53
54 DISALLOW_COPY_AND_ASSIGN(DownloadOverwriteInfoBarDelegateJavaInitiated);
55 };
56
57 } // namespace android
58 } // namespace chrome
59
60 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_OVERWRITE_INFOBAR_DELEGATE_J AVA_INITIATED_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698