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_helper.h" | 10 #include "base/android/jni_helper.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 enum ActionType { | 24 enum ActionType { |
25 ACTION_NONE = 0, | 25 ACTION_NONE = 0, |
26 // Confirm infobar | 26 // Confirm infobar |
27 ACTION_OK = 1, | 27 ACTION_OK = 1, |
28 ACTION_CANCEL = 2, | 28 ACTION_CANCEL = 2, |
29 // Translate infobar | 29 // Translate infobar |
30 ACTION_TRANSLATE = 3, | 30 ACTION_TRANSLATE = 3, |
31 ACTION_TRANSLATE_SHOW_ORIGINAL = 4, | 31 ACTION_TRANSLATE_SHOW_ORIGINAL = 4, |
32 }; | 32 }; |
33 | 33 |
34 explicit InfoBarAndroid(scoped_ptr<InfoBarDelegate> delegate); | 34 InfoBarAndroid(InfoBarService* owner, InfoBarDelegate* delegate); |
35 virtual ~InfoBarAndroid(); | 35 virtual ~InfoBarAndroid(); |
36 | 36 |
37 // InfoBar: | 37 // InfoBar: |
38 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 38 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
39 JNIEnv* env) = 0; | 39 JNIEnv* env) = 0; |
40 | 40 |
41 void set_java_infobar(const base::android::JavaRef<jobject>& java_info_bar); | 41 void set_java_infobar(const base::android::JavaRef<jobject>& java_info_bar); |
42 bool HasSetJavaInfoBar() const; | 42 bool HasSetJavaInfoBar() const; |
43 | 43 |
44 // Tells the Java-side counterpart of this InfoBar to point to the replacement | 44 // Tells the Java-side counterpart of this InfoBar to point to the replacement |
(...skipping 27 matching lines...) Expand all Loading... |
72 private: | 72 private: |
73 base::android::ScopedJavaGlobalRef<jobject> java_info_bar_; | 73 base::android::ScopedJavaGlobalRef<jobject> java_info_bar_; |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(InfoBarAndroid); | 75 DISALLOW_COPY_AND_ASSIGN(InfoBarAndroid); |
76 }; | 76 }; |
77 | 77 |
78 // Registers the NativeInfoBar's native methods through JNI. | 78 // Registers the NativeInfoBar's native methods through JNI. |
79 bool RegisterNativeInfoBar(JNIEnv* env); | 79 bool RegisterNativeInfoBar(JNIEnv* env); |
80 | 80 |
81 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ | 81 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ |
OLD | NEW |