OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
gone
2017/03/24 20:34:30
2017
ramyasharma
2017/03/27 03:36:58
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_COMPACT_INFOBAR_H_ | |
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_COMPACT_INFOBAR_H_ | |
7 | |
8 #include "base/android/scoped_java_ref.h" | |
9 #include "base/macros.h" | |
10 #include "chrome/browser/translate/chrome_translate_client.h" | |
11 #include "chrome/browser/ui/android/infobars/infobar_android.h" | |
12 | |
13 namespace translate { | |
14 class TranslateInfoBarDelegate; | |
15 } | |
16 | |
17 class TranslateCompactInfoBar : public InfoBarAndroid { | |
18 public: | |
19 explicit TranslateCompactInfoBar( | |
20 std::unique_ptr<translate::TranslateInfoBarDelegate> delegate); | |
21 ~TranslateCompactInfoBar() override; | |
22 | |
23 // JNI methods specific to translate. | |
24 void ApplyTranslateOptions(JNIEnv* env, | |
25 const base::android::JavaParamRef<jobject>& obj); | |
26 | |
27 private: | |
28 // InfoBarAndroid: | |
29 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | |
30 JNIEnv* env) override; | |
31 void ProcessButton(int action) override; | |
32 void PassJavaInfoBar(InfoBarAndroid* source) override; | |
gone
2017/03/24 20:34:30
You shouldn't have to implement this for your new
ramyasharma
2017/03/27 03:36:58
Done.
| |
33 void SetJavaInfoBar( | |
34 const base::android::JavaRef<jobject>& java_info_bar) override; | |
35 | |
36 void TransferOwnership(TranslateCompactInfoBar* destination, | |
37 translate::TranslateStep new_type); | |
gone
2017/03/24 20:34:30
Ditto here.
ramyasharma
2017/03/27 03:36:59
Done.
| |
38 bool ShouldDisplayNeverTranslateInfoBarOnCancel(); | |
gone
2017/03/24 20:34:30
Also here. AFAICT from the mocks you don't ever d
ramyasharma
2017/03/27 03:36:59
Yes, we have a toast for never/always cases. Wonde
gone
2017/03/27 21:27:42
The Snackbar is a completely different controls, s
| |
39 | |
40 translate::TranslateInfoBarDelegate* GetDelegate(); | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(TranslateCompactInfoBar); | |
43 }; | |
44 | |
45 // Registers the native methods through JNI. | |
46 bool RegisterTranslateCompactInfoBar(JNIEnv* env); | |
47 | |
48 #endif | |
OLD | NEW |