New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 720027 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: ----

Blocking:
issue 661608



Sign in to add a comment

Complete PaymentRequestEvent for service worked based payment apps

Project Member Reported by gogerald@chromium.org, May 9 2017

Issue description

Some attributes are missing in PaymentRequestEvent (include openWindow).
 
Cc: ma...@chromium.org
Components: -UI>Browser>Autofill>Payments Blink>Payments

gogerald@,

Are you working on this issue? I think it is large size work.

You mentioned that you will work on implementing openWindow() first.

So, if you don't mind, can I take other parts in this issue while you are implementing openWindow() function?

(I think there will be no conflict with your implementation of openWindow())
Yes, I am looking on how to implement openWindow(), confront some challenges. Please feel free to take other parts, thanks for helping.
Project Member

Comment 5 by bugdroid1@chromium.org, May 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec5db40750a7241b6615f21734e6cd9c34fe42e3

commit ec5db40750a7241b6615f21734e6cd9c34fe42e3
Author: gogerald <gogerald@chromium.org>
Date: Tue May 23 15:22:45 2017

Only send schemeless origin to Android native payment apps

Only Android native payment apps accept schemeless origin for history reason.
Service worker based payment apps request full origin.

BUG= 720027 

Review-Url: https://codereview.chromium.org/2894153003
Cr-Commit-Position: refs/heads/master@{#473907}

[modify] https://crrev.com/ec5db40750a7241b6615f21734e6cd9c34fe42e3/chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.java
[modify] https://crrev.com/ec5db40750a7241b6615f21734e6cd9c34fe42e3/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java

Project Member

Comment 6 by bugdroid1@chromium.org, May 24 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/71ca0c99f803166b9129e4e08bfc56da431f02e7

commit 71ca0c99f803166b9129e4e08bfc56da431f02e7
Author: gogerald <gogerald@google.com>
Date: Wed May 24 03:01:17 2017

Cc: bbergher@chromium.org
Video of Ganggui's current implementation:

https://drive.google.com/a/google.com/file/d/0B3ISiXgGE1MNVUtXbmx5cE1XWndyLWhjRjY1LWpTeEdwZ1c0/view?usp=sharing

Comment 8 by zkoch@chromium.org, May 25 2017

Current impl looks great!
Project Member

Comment 9 by bugdroid1@chromium.org, May 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b

commit 35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b
Author: jinho.bang <jinho.bang@samsung.com>
Date: Thu May 25 20:43:46 2017

PaymentHandler: Merge PaymentAppRequest and PaymentRequestEvent.

It was changed in spec side[1][2]. There is no reason to have both of those.
Also, this CL is adding new attributes. (e.g. topLevelOrigin, instrumentKey)

[1] https://github.com/w3c/payment-handler/issues/142
[2] https://w3c.github.io/payment-handler/#the-paymentrequestevent

BUG= 661608 , 720027 

Review-Url: https://codereview.chromium.org/2887713002
Cr-Commit-Position: refs/heads/master@{#474791}

[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentInstrument.java
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/content/renderer/service_worker/service_worker_type_converters.cc
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/content/test/data/payments/payment_app.js
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/content/test/data/payments/payment_app_invocation.html
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/LayoutTests/http/tests/payments/resources/payment-request-event.js
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentAppRequest.idl
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.cpp
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversionTest.cpp
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl
[modify] https://crrev.com/35b8d35a15ee876c0a6a5ce1b69769fabf9bb82b/third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequest.h

Project Member

Comment 10 by bugdroid1@chromium.org, May 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/13eace280f457bc0c065f05a415dc02b07fbb9af

commit 13eace280f457bc0c065f05a415dc02b07fbb9af
Author: gogerald <gogerald@chromium.org>
Date: Fri May 26 18:57:26 2017

Pass stringified details for service worker based payment app response

This CL adds the missing field in https://codereview.chromium.org/2718013004

BUG= 720027 

Review-Url: https://codereview.chromium.org/2903803003
Cr-Commit-Position: refs/heads/master@{#475075}

[modify] https://crrev.com/13eace280f457bc0c065f05a415dc02b07fbb9af/content/renderer/service_worker/service_worker_context_client.cc

Blocking: 661608
Project Member

Comment 12 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1a4b4420868253582467b228f5df4bf167b3ecff

commit 1a4b4420868253582467b228f5df4bf167b3ecff
Author: gogerald <gogerald@chromium.org>
Date: Tue Jun 06 03:37:43 2017

Implement openWindow for web based payment handler

1, This CL implements openWindow in PaymentRequestEvent.idl for service
worker based payment handler.
The spec: https://github.com/w3c/payment-handler.
The intent to implement: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/2ojnMk_T9_c/h7QfIhTeCAAJ

2, This feature is behind the chrome://flags/#enable-experimental-web-platform-features and
chrome://flags/#service_worker_payment_apps flags

3, openWindow opens the url in custom tab with sliding up and down animation.

4, The custom tab is opened within the foreground ChromeActivity so as to not list in recent apps
(Intent.FLAG_ACTIVITY_NEW_TASK is not set).

5, Do not open the url if the foreground activity is not ChromeActivity.

6, Test video record
https://drive.google.com/a/google.com/file/d/0B3ISiXgGE1MNVUtXbmx5cE1XWndyLWhjRjY1LWpTeEdwZ1c0/view?usp=sharing

BUG= 720027 , 661608 

Review-Url: https://codereview.chromium.org/2893823004
Cr-Commit-Position: refs/heads/master@{#477180}

[add] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/chrome/android/java/res/anim/slide_in_up.xml
[add] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/chrome/android/java/res/anim/slide_out_down.xml
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/browser/service_worker/service_worker_client_utils.cc
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/browser/service_worker/service_worker_client_utils.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/browser/service_worker/service_worker_version.cc
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/test/data/payments/payment_app.js
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/content/test/data/payments/payment_app_invocation.html
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/Source/web/WebEmbeddedWorkerImplTest.cpp
[modify] https://crrev.com/1a4b4420868253582467b228f5df4bf167b3ecff/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h

Project Member

Comment 13 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/745f3dff09793d3a5afe793a2599eadb341d2ee0

commit 745f3dff09793d3a5afe793a2599eadb341d2ee0
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue Jun 06 17:23:55 2017

PaymentHandler: Rename PaymentAppRequest with PaymentRequestEventData.

In previous CL[1], the PaymentAppRequest was merged with PaymentRequestEvent
due to spec change. So, we need to change the name appropriately to fit the
current implementation.

Also, this feature is still behind runtime flag (PaymentApp).

The related spec link:
  https://w3c.github.io/payment-handler/

[1] https://codereview.chromium.org/2887713002/

BUG= 661608 , 720027 

Review-Url: https://codereview.chromium.org/2898223002
Cr-Commit-Position: refs/heads/master@{#477316}

[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/payments/payment_app_provider_impl.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/payments/payment_app_provider_impl.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/common/service_worker/service_worker_event_dispatcher.mojom
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/public/browser/payment_app_provider.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/renderer/service_worker/service_worker_type_converters.cc
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/content/renderer/service_worker/service_worker_type_converters.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/BUILD.gn
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/BUILD.gn
[delete] https://crrev.com/838072e44f3a5d5856660d48837689d51eb18100/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[rename] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEventDataConversion.cpp
[add] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEventDataConversion.h
[rename] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEventDataConversionTest.cpp
[rename] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/modules/payments/PaymentRequestEventInit.idl
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/public/BUILD.gn
[rename] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/public/platform/modules/payments/WebPaymentRequestEventData.h
[modify] https://crrev.com/745f3dff09793d3a5afe793a2599eadb341d2ee0/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Project Member

Comment 14 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bb3f76109a2e6b8be54745b7235c650b7b6f77c1

commit bb3f76109a2e6b8be54745b7235c650b7b6f77c1
Author: jinho.bang <jinho.bang@samsung.com>
Date: Tue Jun 06 19:59:07 2017

PaymentHandler: Implement PaymentRequestEvent constructor.

Need the constructor and init dictionary for compatibility with DOM events.
This CL contains IDL change but blink-intent is not required because it is still
behind runtime flag.

Related spec link:
  https://w3c.github.io/payment-handler/#dom-paymentrequestevent
  https://w3c.github.io/payment-handler/#dom-paymentrequesteventinit

BUG= 661608 , 720027 
TEST=payment-request-event.html

Review-Url: https://codereview.chromium.org/2903643002
Cr-Commit-Position: refs/heads/master@{#477382}

[modify] https://crrev.com/bb3f76109a2e6b8be54745b7235c650b7b6f77c1/third_party/WebKit/LayoutTests/http/tests/payments/resources/payment-request-event.js
[modify] https://crrev.com/bb3f76109a2e6b8be54745b7235c650b7b6f77c1/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
[modify] https://crrev.com/bb3f76109a2e6b8be54745b7235c650b7b6f77c1/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h
[modify] https://crrev.com/bb3f76109a2e6b8be54745b7235c650b7b6f77c1/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl
[modify] https://crrev.com/bb3f76109a2e6b8be54745b7235c650b7b6f77c1/third_party/WebKit/Source/modules/payments/PaymentRequestEventInit.idl

Project Member

Comment 15 by bugdroid1@chromium.org, Jun 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87f775b01eff2468818a0ef5476ee1f6177bc9b1

commit 87f775b01eff2468818a0ef5476ee1f6177bc9b1
Author: jinho.bang <jinho.bang@samsung.com>
Date: Mon Jun 12 16:11:59 2017

Replace sequence with FrozenArray in PaymentRequestEvent.idl.

According to the spec[1], |methodData| and |modifiers| attributes should be
FrozenArray instead of sequence.

[1] https://w3c.github.io/payment-handler/#the-paymentrequestevent

BUG= 661608 , 720027 

Review-Url: https://codereview.chromium.org/2934703002
Cr-Commit-Position: refs/heads/master@{#478647}

[modify] https://crrev.com/87f775b01eff2468818a0ef5476ee1f6177bc9b1/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl

Labels: OS-Android
Status: Fixed (was: Assigned)
I think we've implemented all necessary fields of PaymentRequestEvent on Android.
Project Member

Comment 18 by bugdroid1@chromium.org, Aug 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c9485d4e7b97e71c72b9d5ee1b4931a04b234cb

commit 2c9485d4e7b97e71c72b9d5ee1b4931a04b234cb
Author: gogerald <gogerald@google.com>
Date: Fri Aug 04 22:24:54 2017

[Payments] Remove unnecessary TODOes

The spec has been updated to match the implementation,
so remove this unnecessary TODOes.

Bug:  720027 
Change-Id: I30ff0e6769069c29d81b107a913d6b3acc1965c1
Reviewed-on: https://chromium-review.googlesource.com/602579
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492145}
[modify] https://crrev.com/2c9485d4e7b97e71c72b9d5ee1b4931a04b234cb/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp

Sign in to add a comment