| 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/mojom/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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 web_contents->GetBrowserContext(), registration_id, | 182 web_contents->GetBrowserContext(), registration_id, |
| 183 std::move(app_request), | 183 std::move(app_request), |
| 184 base::Bind(&OnPaymentAppInvoked, | 184 base::Bind(&OnPaymentAppInvoked, |
| 185 ScopedJavaGlobalRef<jobject>(env, jweb_contents), | 185 ScopedJavaGlobalRef<jobject>(env, jweb_contents), |
| 186 ScopedJavaGlobalRef<jobject>(env, jcallback))); | 186 ScopedJavaGlobalRef<jobject>(env, jcallback))); |
| 187 } | 187 } |
| 188 | 188 |
| 189 bool RegisterServiceWorkerPaymentAppBridge(JNIEnv* env) { | 189 bool RegisterServiceWorkerPaymentAppBridge(JNIEnv* env) { |
| 190 return RegisterNativesImpl(env); | 190 return RegisterNativesImpl(env); |
| 191 } | 191 } |
| OLD | NEW |