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

Issue 2528683002: PaymentApp: Blink side of payment request event dispatching in service worker. (Closed)

Created:
4 years ago by zino
Modified:
4 years ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, kinuko+watch, rouslan+payments_chromium.org, serviceworker-reviews, blink-reviews-api_chromium.org, dglazkov+blink, kinuko+serviceworker, abarth-chromium, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, shimazu+serviceworker_chromium.org, sebsg+paymentswatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PaymentApp: Blink side of payment request event dispatching in service worker. The payment request event is initiated from browser side when the user selects a payment app in payment request UI. The event is dispached from browser to renderer and then from service worker context client in renderer to blink again. As part of implementation for it, this CL implements interfaces to dispatch the event from renderer to blink. This CL provides the following things. - Add dispatchPaymentRequestEvent() & didHandlePaymentReuqestEvent() to SW. - Expose WebPaymentAppRequestData and related Web types. - Conversion util to convert web type to blink type. According to Onion Soup, we should connect browser and Blink directly but there is no way right now because ServiceWorkerContextClient and others are still in content/renderer side. For this reason, we have no choice but to add many of WebTypes. However, once the SW related codes in content/renderer are moved to Blink, we will able to remove them. BUG=661608 TEST=PaymentAppRequestDataConversionTest.cpp TEST=payment-request-event.html Committed: https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d Cr-Commit-Position: refs/heads/master@{#435947}

Patch Set 1 #

Total comments: 4

Patch Set 2 : test #

Patch Set 3 : test #

Total comments: 3

Patch Set 4 : PaymentApp: Blink side of payment request event dispatching in service worker. #

Total comments: 18

Patch Set 5 : PaymentApp: Blink side of payment request event dispatching in service worker. #

Patch Set 6 : PaymentApp: Blink side of payment request event dispatching in service worker. #

Total comments: 7

Patch Set 7 : PaymentApp: Blink side of payment request event dispatching in service worker. #

Total comments: 2

Patch Set 8 : PaymentApp: Blink side of payment request event dispatching in service worker. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+432 lines, -2 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/payments/resources/payment-request-event.js View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.h View 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp View 1 2 3 4 5 6 7 1 chunk +106 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversionTest.cpp View 1 2 3 4 5 1 chunk +84 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequestEvent.h View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp View 3 chunks +10 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp View 1 2 3 4 5 6 7 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/payments/OWNERS View 7 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequestData.h View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/payments/WebPaymentCurrencyAmount.h View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/payments/WebPaymentDetailsModifier.h View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/payments/WebPaymentItem.h View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/payments/WebPaymentMethodData.h View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h View 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 68 (39 generated)
zino
PTAL. haraken@ for overall blink. rouslan@ for payments parts. nhiroki@ for service worker parts. Implementation ...
4 years ago (2016-11-23 17:37:30 UTC) #7
haraken
Can we add tests? https://codereview.chromium.org/2528683002/diff/1/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp File third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp (right): https://codereview.chromium.org/2528683002/diff/1/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp#newcode37 third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp:37: const WebString& stringifiedData) { You ...
4 years ago (2016-11-24 04:41:54 UTC) #8
shimazu
https://codereview.chromium.org/2528683002/diff/1/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h File third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h (right): https://codereview.chromium.org/2528683002/diff/1/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h#newcode101 third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h:101: const WebPaymentAppRequestData&) = 0; On 2016/11/24 04:41:54, haraken wrote: ...
4 years ago (2016-11-24 05:00:24 UTC) #10
haraken
On 2016/11/24 05:00:24, shimazu wrote: > https://codereview.chromium.org/2528683002/diff/1/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h > File > third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h > (right): > > ...
4 years ago (2016-11-24 05:03:48 UTC) #11
nhiroki
service worker lgtm
4 years ago (2016-11-24 07:25:32 UTC) #12
zino
I added a unit test and a layout test. PTAL. https://codereview.chromium.org/2528683002/diff/1/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp File third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp (right): https://codereview.chromium.org/2528683002/diff/1/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp#newcode37 ...
4 years ago (2016-11-27 17:17:25 UTC) #22
please use gerrit instead
haraken@: We should be using Mojo instead of public/platform/modules/payments/WebPaymentAppRequestData.h and friends, correct? https://codereview.chromium.org/2528683002/diff/60001/third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html File third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html ...
4 years ago (2016-11-28 18:06:32 UTC) #25
please use gerrit instead
Onion soup: http://crbug.com/561879
4 years ago (2016-11-28 18:08:43 UTC) #26
zino
https://codereview.chromium.org/2528683002/diff/60001/third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequestData.h File third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequestData.h (right): https://codereview.chromium.org/2528683002/diff/60001/third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequestData.h#newcode1 third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequestData.h:1: // Copyright 2016 The Chromium Authors. All rights reserved. ...
4 years ago (2016-11-28 21:29:47 UTC) #28
haraken
On 2016/11/28 21:29:47, zino wrote: > https://codereview.chromium.org/2528683002/diff/60001/third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequestData.h > File > third_party/WebKit/public/platform/modules/payments/WebPaymentAppRequestData.h > (right): > > ...
4 years ago (2016-11-29 02:11:05 UTC) #29
please use gerrit instead
https://codereview.chromium.org/2528683002/diff/80001/third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html File third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html (right): https://codereview.chromium.org/2528683002/diff/80001/third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html#newcode1 third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html:1: <!doctype html> Please follow new layout test guidelines: https://chromium.googlesource.com/chromium/src/+/master/docs/testing/writing_layout_tests.md ...
4 years ago (2016-11-29 15:10:36 UTC) #30
zino
Thank you for review. https://codereview.chromium.org/2528683002/diff/80001/third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html File third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html (right): https://codereview.chromium.org/2528683002/diff/80001/third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html#newcode1 third_party/WebKit/LayoutTests/http/tests/payments/payment-request-event.html:1: <!doctype html> On 2016/11/29 15:10:35, ...
4 years ago (2016-11-30 16:09:33 UTC) #31
please use gerrit instead
lgtm
4 years ago (2016-11-30 17:19:19 UTC) #32
zino
On 2016/11/30 17:19:19, rouslan wrote: > lgtm Thanks. haraken@ PTAL
4 years ago (2016-12-01 02:07:38 UTC) #33
haraken
This CL LGTM but I have a question about how ScriptState::Scope should be used in ...
4 years ago (2016-12-01 08:24:27 UTC) #38
kinuko
https://codereview.chromium.org/2528683002/diff/120001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp File third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp (right): https://codereview.chromium.org/2528683002/diff/120001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp#newcode336 third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp:336: workerGlobalScope()->scriptController()->getScriptState()); On 2016/12/01 08:24:27, haraken wrote: > > nhiroki@: ...
4 years ago (2016-12-01 13:01:52 UTC) #40
nhiroki
https://codereview.chromium.org/2528683002/diff/120001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp File third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp (right): https://codereview.chromium.org/2528683002/diff/120001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp#newcode336 third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp:336: workerGlobalScope()->scriptController()->getScriptState()); On 2016/12/01 13:01:52, kinuko wrote: > On 2016/12/01 ...
4 years ago (2016-12-02 02:30:15 UTC) #41
zino
https://codereview.chromium.org/2528683002/diff/120001/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp File third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp (right): https://codereview.chromium.org/2528683002/diff/120001/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp#newcode24 third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp:24: void PaymentRequestEvent::data(PaymentAppRequestData& data) const { On 2016/12/01 08:24:27, haraken ...
4 years ago (2016-12-02 03:13:49 UTC) #43
haraken
On 2016/12/02 03:13:49, zino wrote: > https://codereview.chromium.org/2528683002/diff/120001/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp > File third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp (right): > > https://codereview.chromium.org/2528683002/diff/120001/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp#newcode24 > ...
4 years ago (2016-12-02 03:40:27 UTC) #44
haraken
On 2016/12/02 03:40:27, haraken wrote: > On 2016/12/02 03:13:49, zino wrote: > > > https://codereview.chromium.org/2528683002/diff/120001/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp ...
4 years ago (2016-12-02 03:41:42 UTC) #45
nhiroki
On 2016/12/02 03:41:42, haraken wrote: > On 2016/12/02 03:40:27, haraken wrote: > > On 2016/12/02 ...
4 years ago (2016-12-02 03:44:03 UTC) #47
yhirano
On 2016/12/02 03:44:03, nhiroki wrote: > On 2016/12/02 03:41:42, haraken wrote: > > On 2016/12/02 ...
4 years ago (2016-12-02 04:00:44 UTC) #48
zino
haraken@ PTAL https://codereview.chromium.org/2528683002/diff/140001/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp File third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp (right): https://codereview.chromium.org/2528683002/diff/140001/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp#newcode57 third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp:57: if (scriptState->contextIsValid()) Done. https://codereview.chromium.org/2528683002/diff/140001/third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp#newcode60 third_party/WebKit/Source/modules/payments/PaymentAppRequestDataConversion.cpp:60: ScriptState::Scope scope( ...
4 years ago (2016-12-02 04:18:33 UTC) #49
haraken
LGTM
4 years ago (2016-12-02 04:22:44 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2528683002/140001
4 years ago (2016-12-02 04:25:34 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/244768)
4 years ago (2016-12-02 04:36:40 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2528683002/180001
4 years ago (2016-12-02 14:49:32 UTC) #63
commit-bot: I haz the power
Committed patchset #8 (id:180001)
4 years ago (2016-12-02 16:20:46 UTC) #66
commit-bot: I haz the power
4 years ago (2016-12-02 16:22:27 UTC) #68
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/dbfe96630903e024d0b9fae92a8cd4859dbbbe5d
Cr-Commit-Position: refs/heads/master@{#435947}

Powered by Google App Engine
This is Rietveld 408576698