Index: chrome/browser/ui/android/infobars/translate_compact_infobar.h |
diff --git a/chrome/browser/ui/android/infobars/translate_compact_infobar.h b/chrome/browser/ui/android/infobars/translate_compact_infobar.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bf0a34a53f18ddb127e6ce70e4c3f09cd12b6b8f |
--- /dev/null |
+++ b/chrome/browser/ui/android/infobars/translate_compact_infobar.h |
@@ -0,0 +1,48 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
gone
2017/03/24 20:34:30
2017
ramyasharma
2017/03/27 03:36:58
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_COMPACT_INFOBAR_H_ |
+#define CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_COMPACT_INFOBAR_H_ |
+ |
+#include "base/android/scoped_java_ref.h" |
+#include "base/macros.h" |
+#include "chrome/browser/translate/chrome_translate_client.h" |
+#include "chrome/browser/ui/android/infobars/infobar_android.h" |
+ |
+namespace translate { |
+class TranslateInfoBarDelegate; |
+} |
+ |
+class TranslateCompactInfoBar : public InfoBarAndroid { |
+ public: |
+ explicit TranslateCompactInfoBar( |
+ std::unique_ptr<translate::TranslateInfoBarDelegate> delegate); |
+ ~TranslateCompactInfoBar() override; |
+ |
+ // JNI methods specific to translate. |
+ void ApplyTranslateOptions(JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj); |
+ |
+ private: |
+ // InfoBarAndroid: |
+ base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
+ JNIEnv* env) override; |
+ void ProcessButton(int action) override; |
+ 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.
|
+ void SetJavaInfoBar( |
+ const base::android::JavaRef<jobject>& java_info_bar) override; |
+ |
+ void TransferOwnership(TranslateCompactInfoBar* destination, |
+ translate::TranslateStep new_type); |
gone
2017/03/24 20:34:30
Ditto here.
ramyasharma
2017/03/27 03:36:59
Done.
|
+ 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
|
+ |
+ translate::TranslateInfoBarDelegate* GetDelegate(); |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TranslateCompactInfoBar); |
+}; |
+ |
+// Registers the native methods through JNI. |
+bool RegisterTranslateCompactInfoBar(JNIEnv* env); |
+ |
+#endif |