OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // Make sure this set of values is aligned with the java constants defined in | 25 // Make sure this set of values is aligned with the java constants defined in |
26 // InfoBar.java! | 26 // InfoBar.java! |
27 enum ActionType { | 27 enum ActionType { |
28 ACTION_NONE = 0, | 28 ACTION_NONE = 0, |
29 // Confirm infobar | 29 // Confirm infobar |
30 ACTION_OK = 1, | 30 ACTION_OK = 1, |
31 ACTION_CANCEL = 2, | 31 ACTION_CANCEL = 2, |
32 // Translate infobar | 32 // Translate infobar |
33 ACTION_TRANSLATE = 3, | 33 ACTION_TRANSLATE = 3, |
34 ACTION_TRANSLATE_SHOW_ORIGINAL = 4, | 34 ACTION_TRANSLATE_SHOW_ORIGINAL = 4, |
| 35 // Download overwrite infobar |
| 36 ACTION_OVERWRITE = 5, |
| 37 ACTION_CREATE_NEW_FILE = 6, |
35 }; | 38 }; |
36 | 39 |
37 explicit InfoBarAndroid(scoped_ptr<infobars::InfoBarDelegate> delegate); | 40 explicit InfoBarAndroid(scoped_ptr<infobars::InfoBarDelegate> delegate); |
38 ~InfoBarAndroid() override; | 41 ~InfoBarAndroid() override; |
39 | 42 |
40 // InfoBar: | 43 // InfoBar: |
41 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 44 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
42 JNIEnv* env) = 0; | 45 JNIEnv* env) = 0; |
43 | 46 |
44 void set_java_infobar(const base::android::JavaRef<jobject>& java_info_bar); | 47 void set_java_infobar(const base::android::JavaRef<jobject>& java_info_bar); |
(...skipping 30 matching lines...) Expand all Loading... |
75 private: | 78 private: |
76 base::android::ScopedJavaGlobalRef<jobject> java_info_bar_; | 79 base::android::ScopedJavaGlobalRef<jobject> java_info_bar_; |
77 | 80 |
78 DISALLOW_COPY_AND_ASSIGN(InfoBarAndroid); | 81 DISALLOW_COPY_AND_ASSIGN(InfoBarAndroid); |
79 }; | 82 }; |
80 | 83 |
81 // Registers the NativeInfoBar's native methods through JNI. | 84 // Registers the NativeInfoBar's native methods through JNI. |
82 bool RegisterNativeInfoBar(JNIEnv* env); | 85 bool RegisterNativeInfoBar(JNIEnv* env); |
83 | 86 |
84 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ | 87 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ |
OLD | NEW |