Index: components/payments/content/android/component_jni_registrar.h |
diff --git a/components/payments/content/android/currency_formatter_android.h b/components/payments/content/android/component_jni_registrar.h |
similarity index 13% |
copy from components/payments/content/android/currency_formatter_android.h |
copy to components/payments/content/android/component_jni_registrar.h |
index 9693c200b83a989119069e818c1f53c7cd81d21d..2827c53c9c576e8eaebdeb2c00705fe71ca98c7d 100644 |
--- a/components/payments/content/android/currency_formatter_android.h |
+++ b/components/payments/content/android/component_jni_registrar.h |
@@ -2,52 +2,20 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef COMPONENTS_PAYMENTS_CONTENT_ANDROID_CURRENCY_FORMATTER_ANDROID_H_ |
-#define COMPONENTS_PAYMENTS_CONTENT_ANDROID_CURRENCY_FORMATTER_ANDROID_H_ |
+#ifndef COMPONENTS_PAYMENTS_CONTENT_ANDROID_COMPONENT_JNI_REGISTRAR_H_ |
+#define COMPONENTS_PAYMENTS_CONTENT_ANDROID_COMPONENT_JNI_REGISTRAR_H_ |
#include <jni.h> |
-#include <memory> |
- |
-#include "base/android/scoped_java_ref.h" |
-#include "base/macros.h" |
namespace payments { |
-class CurrencyFormatter; |
- |
-// Forwarding calls to payments::CurrencyFormatter. |
-class CurrencyFormatterAndroid { |
- public: |
- CurrencyFormatterAndroid( |
- JNIEnv* env, |
- jobject unused_obj, |
- const base::android::JavaParamRef<jstring>& currency_code, |
- const base::android::JavaParamRef<jstring>& currency_system, |
- const base::android::JavaParamRef<jstring>& locale_name); |
- ~CurrencyFormatterAndroid(); |
- |
- // Message from Java to destroy this object. |
- void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
- |
- // Refer to CurrencyFormatter::Format documentation. |
- base::android::ScopedJavaLocalRef<jstring> Format( |
- JNIEnv* env, |
- const base::android::JavaParamRef<jobject>& unused_obj, |
- const base::android::JavaParamRef<jstring>& amount); |
- |
- base::android::ScopedJavaLocalRef<jstring> GetFormattedCurrencyCode( |
- JNIEnv* env, |
- const base::android::JavaParamRef<jobject>& unused_obj); |
- |
- // Registers the JNI bindings for this class. |
- static bool Register(JNIEnv* env); |
+namespace android { |
- private: |
- std::unique_ptr<CurrencyFormatter> currency_formatter_; |
+// Register all JNI bindings necessary for the payments component. |
+bool RegisterPayments(JNIEnv* env); |
- DISALLOW_COPY_AND_ASSIGN(CurrencyFormatterAndroid); |
-}; |
+} // namespace android |
} // namespace payments |
-#endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_CURRENCY_FORMATTER_ANDROID_H_ |
+#endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_COMPONENT_JNI_REGISTRAR_H_ |