| 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/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.infobar | 24 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.infobar |
| 25 // GENERATED_JAVA_PREFIX_TO_STRIP: ACTION_ | 25 // GENERATED_JAVA_PREFIX_TO_STRIP: ACTION_ |
| 26 enum ActionType { | 26 enum ActionType { |
| 27 ACTION_NONE = 0, | 27 ACTION_NONE = 0, |
| 28 // Confirm infobar | 28 // Confirm infobar |
| 29 ACTION_OK = 1, | 29 ACTION_OK = 1, |
| 30 ACTION_CANCEL = 2, | 30 ACTION_CANCEL = 2, |
| 31 // Translate infobar | 31 // Translate infobar |
| 32 ACTION_TRANSLATE = 3, | 32 ACTION_TRANSLATE = 3, |
| 33 ACTION_TRANSLATE_SHOW_ORIGINAL = 4, | 33 ACTION_TRANSLATE_SHOW_ORIGINAL = 4, |
| 34 // Download overwrite infobar | |
| 35 ACTION_OVERWRITE = 5, | |
| 36 ACTION_CREATE_NEW_FILE = 6, | |
| 37 }; | 34 }; |
| 38 | 35 |
| 39 explicit InfoBarAndroid(std::unique_ptr<infobars::InfoBarDelegate> delegate); | 36 explicit InfoBarAndroid(std::unique_ptr<infobars::InfoBarDelegate> delegate); |
| 40 ~InfoBarAndroid() override; | 37 ~InfoBarAndroid() override; |
| 41 | 38 |
| 42 // InfoBar: | 39 // InfoBar: |
| 43 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 40 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
| 44 JNIEnv* env) = 0; | 41 JNIEnv* env) = 0; |
| 45 | 42 |
| 46 virtual void SetJavaInfoBar( | 43 virtual void SetJavaInfoBar( |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 private: | 78 private: |
| 82 base::android::ScopedJavaGlobalRef<jobject> java_info_bar_; | 79 base::android::ScopedJavaGlobalRef<jobject> java_info_bar_; |
| 83 | 80 |
| 84 DISALLOW_COPY_AND_ASSIGN(InfoBarAndroid); | 81 DISALLOW_COPY_AND_ASSIGN(InfoBarAndroid); |
| 85 }; | 82 }; |
| 86 | 83 |
| 87 // Registers the NativeInfoBar's native methods through JNI. | 84 // Registers the NativeInfoBar's native methods through JNI. |
| 88 bool RegisterNativeInfoBar(JNIEnv* env); | 85 bool RegisterNativeInfoBar(JNIEnv* env); |
| 89 | 86 |
| 90 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ | 87 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_ |
| OLD | NEW |