| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_PAYMENTS_ANDROID_CURRENCY_FORMATTER_ANDROID_H_ | 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_ANDROID_CURRENCY_FORMATTER_ANDROID_H_ |
| 6 #define COMPONENTS_PAYMENTS_ANDROID_CURRENCY_FORMATTER_ANDROID_H_ | 6 #define COMPONENTS_PAYMENTS_CONTENT_ANDROID_CURRENCY_FORMATTER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> |
| 8 #include <memory> | 9 #include <memory> |
| 9 | 10 |
| 10 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "components/payments/currency_formatter.h" | |
| 13 | 13 |
| 14 namespace payments { | 14 namespace payments { |
| 15 | 15 |
| 16 class CurrencyFormatter; |
| 17 |
| 16 // Forwarding calls to payments::CurrencyFormatter. | 18 // Forwarding calls to payments::CurrencyFormatter. |
| 17 class CurrencyFormatterAndroid { | 19 class CurrencyFormatterAndroid { |
| 18 public: | 20 public: |
| 19 CurrencyFormatterAndroid( | 21 CurrencyFormatterAndroid( |
| 20 JNIEnv* env, | 22 JNIEnv* env, |
| 21 jobject unused_obj, | 23 jobject unused_obj, |
| 22 const base::android::JavaParamRef<jstring>& currency_code, | 24 const base::android::JavaParamRef<jstring>& currency_code, |
| 23 const base::android::JavaParamRef<jstring>& currency_system, | 25 const base::android::JavaParamRef<jstring>& currency_system, |
| 24 const base::android::JavaParamRef<jstring>& locale_name); | 26 const base::android::JavaParamRef<jstring>& locale_name); |
| 25 ~CurrencyFormatterAndroid(); | 27 ~CurrencyFormatterAndroid(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 41 static bool Register(JNIEnv* env); | 43 static bool Register(JNIEnv* env); |
| 42 | 44 |
| 43 private: | 45 private: |
| 44 std::unique_ptr<CurrencyFormatter> currency_formatter_; | 46 std::unique_ptr<CurrencyFormatter> currency_formatter_; |
| 45 | 47 |
| 46 DISALLOW_COPY_AND_ASSIGN(CurrencyFormatterAndroid); | 48 DISALLOW_COPY_AND_ASSIGN(CurrencyFormatterAndroid); |
| 47 }; | 49 }; |
| 48 | 50 |
| 49 } // namespace payments | 51 } // namespace payments |
| 50 | 52 |
| 51 #endif // COMPONENTS_PAYMENTS_ANDROID_CURRENCY_FORMATTER_ANDROID_H_ | 53 #endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_CURRENCY_FORMATTER_ANDROID_H_ |
| OLD | NEW |