Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/browser/android/payments/service_worker_payment_app_bridge.cc

Issue 2739033004: Send origin of the iframe browsing context (Closed)
Patch Set: Address review comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 ScopedJavaGlobalRef<jobject>(env, jweb_contents), 83 ScopedJavaGlobalRef<jobject>(env, jweb_contents),
84 ScopedJavaGlobalRef<jobject>(env, jcallback))); 84 ScopedJavaGlobalRef<jobject>(env, jcallback)));
85 } 85 }
86 86
87 static void InvokePaymentApp(JNIEnv* env, 87 static void InvokePaymentApp(JNIEnv* env,
88 const JavaParamRef<jclass>& jcaller, 88 const JavaParamRef<jclass>& jcaller,
89 const JavaParamRef<jobject>& jweb_contents, 89 const JavaParamRef<jobject>& jweb_contents,
90 jlong registration_id, 90 jlong registration_id,
91 const JavaParamRef<jstring>& joption_id, 91 const JavaParamRef<jstring>& joption_id,
92 const JavaParamRef<jstring>& jorigin, 92 const JavaParamRef<jstring>& jorigin,
93 const JavaParamRef<jstring>& jiframeOrigin,
please use gerrit instead 2017/03/15 21:07:39 By the way, I'd recommend avoiding making a change
93 const JavaParamRef<jobjectArray>& jmethod_data, 94 const JavaParamRef<jobjectArray>& jmethod_data,
94 const JavaParamRef<jobject>& jtotal, 95 const JavaParamRef<jobject>& jtotal,
95 const JavaParamRef<jobjectArray>& jmodifiers) { 96 const JavaParamRef<jobjectArray>& jmodifiers) {
96 content::WebContents* web_contents = 97 content::WebContents* web_contents =
97 content::WebContents::FromJavaWebContents(jweb_contents); 98 content::WebContents::FromJavaWebContents(jweb_contents);
98 99
99 PaymentAppRequestPtr app_request = PaymentAppRequest::New(); 100 PaymentAppRequestPtr app_request = PaymentAppRequest::New();
100 101
101 app_request->optionId = ConvertJavaStringToUTF8(env, joption_id); 102 app_request->optionId = ConvertJavaStringToUTF8(env, joption_id);
102 app_request->origin = GURL(ConvertJavaStringToUTF8(env, jorigin)); 103 app_request->origin = GURL(ConvertJavaStringToUTF8(env, jorigin));
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 169 }
169 170
170 content::PaymentAppProvider::GetInstance()->InvokePaymentApp( 171 content::PaymentAppProvider::GetInstance()->InvokePaymentApp(
171 web_contents->GetBrowserContext(), registration_id, 172 web_contents->GetBrowserContext(), registration_id,
172 std::move(app_request)); 173 std::move(app_request));
173 } 174 }
174 175
175 bool RegisterServiceWorkerPaymentAppBridge(JNIEnv* env) { 176 bool RegisterServiceWorkerPaymentAppBridge(JNIEnv* env) {
176 return RegisterNativesImpl(env); 177 return RegisterNativesImpl(env);
177 } 178 }
OLDNEW
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698