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 20 matching lines...) Expand all Loading... |
31 ACTION_OK = 1, | 31 ACTION_OK = 1, |
32 ACTION_CANCEL = 2, | 32 ACTION_CANCEL = 2, |
33 // Translate infobar | 33 // Translate infobar |
34 ACTION_TRANSLATE = 3, | 34 ACTION_TRANSLATE = 3, |
35 ACTION_TRANSLATE_SHOW_ORIGINAL = 4, | 35 ACTION_TRANSLATE_SHOW_ORIGINAL = 4, |
36 // Download overwrite infobar | 36 // Download overwrite infobar |
37 ACTION_OVERWRITE = 5, | 37 ACTION_OVERWRITE = 5, |
38 ACTION_CREATE_NEW_FILE = 6, | 38 ACTION_CREATE_NEW_FILE = 6, |
39 }; | 39 }; |
40 | 40 |
41 explicit InfoBarAndroid(scoped_ptr<infobars::InfoBarDelegate> delegate); | 41 explicit InfoBarAndroid(std::unique_ptr<infobars::InfoBarDelegate> delegate); |
42 ~InfoBarAndroid() override; | 42 ~InfoBarAndroid() override; |
43 | 43 |
44 // InfoBar: | 44 // InfoBar: |
45 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 45 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
46 JNIEnv* env) = 0; | 46 JNIEnv* env) = 0; |
47 | 47 |
48 virtual void SetJavaInfoBar( | 48 virtual void SetJavaInfoBar( |
49 const base::android::JavaRef<jobject>& java_info_bar); | 49 const base::android::JavaRef<jobject>& java_info_bar); |
50 jobject GetJavaInfoBar(); | 50 jobject GetJavaInfoBar(); |
51 bool HasSetJavaInfoBar() const; | 51 bool HasSetJavaInfoBar() const; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 private: | 83 private: |
84 base::android::ScopedJavaGlobalRef<jobject> java_info_bar_; | 84 base::android::ScopedJavaGlobalRef<jobject> java_info_bar_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(InfoBarAndroid); | 86 DISALLOW_COPY_AND_ASSIGN(InfoBarAndroid); |
87 }; | 87 }; |
88 | 88 |
89 // Registers the NativeInfoBar's native methods through JNI. | 89 // Registers the NativeInfoBar's native methods through JNI. |
90 bool RegisterNativeInfoBar(JNIEnv* env); | 90 bool RegisterNativeInfoBar(JNIEnv* env); |
91 | 91 |
92 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ | 92 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ |
OLD | NEW |