| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "chrome/browser/android/payments/service_worker_payment_app_bridge.h" | 5 #include "chrome/browser/android/payments/service_worker_payment_app_bridge.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/android/jni_array.h" | 9 #include "base/android/jni_array.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| 11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
| 13 #include "components/payments/payment_app.mojom.h" | 13 #include "components/payments/content/payment_app.mojom.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/payment_app_provider.h" | 15 #include "content/public/browser/payment_app_provider.h" |
| 16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
| 17 #include "jni/ServiceWorkerPaymentAppBridge_jni.h" | 17 #include "jni/ServiceWorkerPaymentAppBridge_jni.h" |
| 18 | 18 |
| 19 using base::android::AttachCurrentThread; | 19 using base::android::AttachCurrentThread; |
| 20 using base::android::ConvertJavaStringToUTF8; | 20 using base::android::ConvertJavaStringToUTF8; |
| 21 using base::android::ConvertUTF8ToJavaString; | 21 using base::android::ConvertUTF8ToJavaString; |
| 22 using base::android::JavaParamRef; | 22 using base::android::JavaParamRef; |
| 23 using base::android::JavaRef; | 23 using base::android::JavaRef; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 | 169 |
| 170 content::PaymentAppProvider::GetInstance()->InvokePaymentApp( | 170 content::PaymentAppProvider::GetInstance()->InvokePaymentApp( |
| 171 web_contents->GetBrowserContext(), registration_id, | 171 web_contents->GetBrowserContext(), registration_id, |
| 172 std::move(app_request)); | 172 std::move(app_request)); |
| 173 } | 173 } |
| 174 | 174 |
| 175 bool RegisterServiceWorkerPaymentAppBridge(JNIEnv* env) { | 175 bool RegisterServiceWorkerPaymentAppBridge(JNIEnv* env) { |
| 176 return RegisterNativesImpl(env); | 176 return RegisterNativesImpl(env); |
| 177 } | 177 } |
| OLD | NEW |