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

Side by Side Diff: chrome/browser/ui/android/infobars/download_overwrite_infobar.h

Issue 580043002: [Android] Prompt with infobar on filename conflict (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed ted's comments Created 6 years, 2 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 2014 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_UI_ANDROID_INFOBARS_DOWNLOAD_OVERWRITE_INFOBAR_H_
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_DOWNLOAD_OVERWRITE_INFOBAR_H_
7
8 #include "base/android/scoped_java_ref.h"
9 #include "base/basictypes.h"
10 #include "chrome/browser/ui/android/infobars/infobar_android.h"
11
12 namespace chrome {
13 namespace android {
14 class DownloadOverwriteInfoBarDelegate;
15 }
16 }
17
18 // A native-side implementation of an infobar to ask whether to overwrite
19 // an existing file with a new download.
20 class DownloadOverwriteInfoBar : public InfoBarAndroid {
21 public:
22 static scoped_ptr<infobars::InfoBar> CreateInfoBar(
23 scoped_ptr<chrome::android::DownloadOverwriteInfoBarDelegate> delegate);
24 virtual ~DownloadOverwriteInfoBar();
Peter Kasting 2014/10/24 01:32:23 Nit: "override" rather than "virtual"
Changwan Ryu 2014/10/27 06:40:04 Done.
25
26 private:
27 explicit DownloadOverwriteInfoBar(
28 scoped_ptr<chrome::android::DownloadOverwriteInfoBarDelegate> delegate);
29
30 // InfoBarAndroid:
31 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar(
Peter Kasting 2014/10/24 01:32:23 Nit: "virtual" not necessary with "override" (2 pl
Changwan Ryu 2014/10/27 06:40:05 Done.
32 JNIEnv* env) override;
33 virtual void ProcessButton(int action,
34 const std::string& action_value) override;
35
36 chrome::android::DownloadOverwriteInfoBarDelegate* GetDelegate();
37
38 base::android::ScopedJavaGlobalRef<jobject> java_delegate_;
39
40 DISALLOW_COPY_AND_ASSIGN(DownloadOverwriteInfoBar);
41 };
42
43 // Registers the native methods through JNI.
44 bool RegisterDownloadOverwriteInfoBarDelegate(JNIEnv* env);
45
46 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_DOWNLOAD_OVERWRITE_INFOBAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698