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_TRANSLATE_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_ |
7 | 7 |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "chrome/browser/translate/chrome_translate_client.h" | 10 #include "chrome/browser/translate/chrome_translate_client.h" |
11 #include "chrome/browser/ui/android/infobars/infobar_android.h" | 11 #include "chrome/browser/ui/android/infobars/infobar_android.h" |
12 | 12 |
13 namespace translate { | 13 namespace translate { |
14 class TranslateInfoBarDelegate; | 14 class TranslateInfoBarDelegate; |
15 } | 15 } |
16 | 16 |
17 class TranslateInfoBar : public InfoBarAndroid { | 17 class TranslateInfoBar : public InfoBarAndroid { |
18 public: | 18 public: |
19 explicit TranslateInfoBar( | 19 explicit TranslateInfoBar( |
20 scoped_ptr<translate::TranslateInfoBarDelegate> delegate); | 20 std::unique_ptr<translate::TranslateInfoBarDelegate> delegate); |
21 ~TranslateInfoBar() override; | 21 ~TranslateInfoBar() override; |
22 | 22 |
23 // JNI methods specific to translate. | 23 // JNI methods specific to translate. |
24 void ApplyTranslateOptions( | 24 void ApplyTranslateOptions( |
25 JNIEnv* env, | 25 JNIEnv* env, |
26 const base::android::JavaParamRef<jobject>& obj, | 26 const base::android::JavaParamRef<jobject>& obj, |
27 const base::android::JavaParamRef<jstring>& source_language_code, | 27 const base::android::JavaParamRef<jstring>& source_language_code, |
28 const base::android::JavaParamRef<jstring>& target_language_code, | 28 const base::android::JavaParamRef<jstring>& target_language_code, |
29 bool always_translate, | 29 bool always_translate, |
30 bool never_translate_language, | 30 bool never_translate_language, |
(...skipping 14 matching lines...) Expand all Loading... |
45 | 45 |
46 translate::TranslateInfoBarDelegate* GetDelegate(); | 46 translate::TranslateInfoBarDelegate* GetDelegate(); |
47 | 47 |
48 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBar); | 48 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBar); |
49 }; | 49 }; |
50 | 50 |
51 // Registers the native methods through JNI. | 51 // Registers the native methods through JNI. |
52 bool RegisterTranslateInfoBarDelegate(JNIEnv* env); | 52 bool RegisterTranslateInfoBarDelegate(JNIEnv* env); |
53 | 53 |
54 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_ | 54 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_ |
OLD | NEW |