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

Issue 720029 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 661608



Sign in to add a comment

Add icon for service worker based payment instrument

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

Issue description

^^^

 
I will start looking this issue while I am waiting for review of the CL to openWindow for payment handler if nobody working on it.

This is necessary before implementing the UI to present web based payment handlers.
Looks the spec is still not clear about how to fetch the icons, https://github.com/w3c/payment-handler/issues/125
Blocking: 661608
You should use the icons definition from web app manifest:

https://developer.mozilla.org/en-US/docs/Web/Manifest#icons
Status: Started (was: Assigned)
Okay, sounds good, let's go that way, I will download, decode and persist icon during SetPaymentInstrument. Note that the payment instrument may provide multiple sized icons, I will choose the smallest available icon for now (https://cs.chromium.org/chromium/src/chrome/browser/image_decoder.h?rcl=b87d80f6485276511b3c543e90cde926eed2838d&l=85).
test screenshot,
Screenshot_20170608-155716.png
111 KB View Download

Comment 7 by zkoch@chromium.org, Jun 8 2017

Nice!

Comment 8 by ma...@chromium.org, Jun 10 2017

We've got to get a better icon for BobPay :)
Project Member

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

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

commit d8c5af3464ac1f827f8e673095c8e24496eea1da
Author: gogerald <gogerald@chromium.org>
Date: Wed Jun 14 02:22:36 2017

Implement payment instrument icons

Tested bobpay:
https://github.com/gogerald/gogerald.github.io/blob/master/pr/bobpaywebapp/register.js

The spec:
https://github.com/w3c/payment-handler/pull/174

BUG= 720029 

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

[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentInstrument.java
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestServiceWorkerPaymentAppTest.java
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/components/payments/mojom/payment_app.mojom
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/content/browser/BUILD.gn
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/content/browser/payments/payment_app.proto
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/content/browser/payments/payment_app_database.cc
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/content/browser/payments/payment_app_database.h
[add] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/content/browser/payments/payment_instrument_icon_fetcher.cc
[add] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/content/browser/payments/payment_instrument_icon_fetcher.h
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/content/public/browser/stored_payment_instrument.h
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/third_party/WebKit/Source/modules/modules_idl_files.gni
[add] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/third_party/WebKit/Source/modules/payments/ImageObject.idl
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/third_party/WebKit/Source/modules/payments/PaymentInstrument.idl
[modify] https://crrev.com/d8c5af3464ac1f827f8e673095c8e24496eea1da/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp

Status: Fixed (was: Started)
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments

Sign in to add a comment