^^^
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
You should use the icons definition from web app manifest: https://developer.mozilla.org/en-US/docs/Web/Manifest#icons
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,
Nice!
We've got to get a better icon for BobPay :)
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
Comment 1 by gogerald@chromium.org
, May 30 2017