| 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_CONTENT_ANDROID_PAYMENT_MANIFEST_PARSER_ANDROID_H_ | 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_ANDROID_PAYMENT_MANIFEST_PARSER_ANDROID_H_ |
| 6 #define COMPONENTS_PAYMENTS_CONTENT_ANDROID_PAYMENT_MANIFEST_PARSER_ANDROID_H_ | 6 #define COMPONENTS_PAYMENTS_CONTENT_ANDROID_PAYMENT_MANIFEST_PARSER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/android/jni_android.h" | 13 #include "base/android/jni_android.h" |
| 14 #include "base/android/scoped_java_ref.h" | 14 #include "base/android/scoped_java_ref.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "components/payments/content/payment_manifest_parser_host.h" | 16 #include "components/payments/content/payment_manifest_parser_host.h" |
| 17 | 17 |
| 18 namespace payments { | 18 namespace payments { |
| 19 | 19 |
| 20 // Android wrapper for the host of the utility process that parses manifest | 20 // Android wrapper for the host of the utility process that parses manifest |
| 21 // contents. | 21 // contents. |
| 22 class PaymentManifestParserAndroid { | 22 class PaymentManifestParserAndroid { |
| 23 public: | 23 public: |
| 24 PaymentManifestParserAndroid(); | 24 PaymentManifestParserAndroid(); |
| 25 ~PaymentManifestParserAndroid(); | 25 ~PaymentManifestParserAndroid(); |
| 26 | 26 |
| 27 void StartUtilityProcess(JNIEnv* env, | 27 void StartUtilityProcess(JNIEnv* env, |
| 28 const base::android::JavaParamRef<jobject>& jcaller); | 28 const base::android::JavaParamRef<jobject>& jcaller); |
| 29 | 29 |
| 30 void ParsePaymentManifest( | 30 void ParsePaymentMethodManifest( |
| 31 JNIEnv* env, | 31 JNIEnv* env, |
| 32 const base::android::JavaParamRef<jobject>& jcaller, | 32 const base::android::JavaParamRef<jobject>& jcaller, |
| 33 const base::android::JavaParamRef<jstring>& jcontent, | 33 const base::android::JavaParamRef<jstring>& jcontent, |
| 34 const base::android::JavaParamRef<jobject>& jcallback); |
| 35 |
| 36 void ParseWebAppManifest( |
| 37 JNIEnv* env, |
| 38 const base::android::JavaParamRef<jobject>& jcaller, |
| 39 const base::android::JavaParamRef<jstring>& jcontent, |
| 34 const base::android::JavaParamRef<jobject>& jcallback); | 40 const base::android::JavaParamRef<jobject>& jcallback); |
| 35 | 41 |
| 36 // Deletes this object. | 42 // Deletes this object. |
| 37 void StopUtilityProcess(JNIEnv* env, | 43 void StopUtilityProcess(JNIEnv* env, |
| 38 const base::android::JavaParamRef<jobject>& jcaller); | 44 const base::android::JavaParamRef<jobject>& jcaller); |
| 39 | 45 |
| 40 private: | 46 private: |
| 41 PaymentManifestParserHost host_; | 47 PaymentManifestParserHost host_; |
| 42 | 48 |
| 43 DISALLOW_COPY_AND_ASSIGN(PaymentManifestParserAndroid); | 49 DISALLOW_COPY_AND_ASSIGN(PaymentManifestParserAndroid); |
| 44 }; | 50 }; |
| 45 | 51 |
| 46 bool RegisterPaymentManifestParser(JNIEnv* env); | 52 bool RegisterPaymentManifestParser(JNIEnv* env); |
| 47 | 53 |
| 48 } // namespace payments | 54 } // namespace payments |
| 49 | 55 |
| 50 #endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_PAYMENT_MANIFEST_PARSER_ANDROID_H
_ | 56 #endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_PAYMENT_MANIFEST_PARSER_ANDROID_H
_ |
| OLD | NEW |