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

Issue 2695653004: [Web Payments] Add a mechanism to build item lists in the PR dialog. (Closed)

Created:
3 years, 10 months ago by anthonyvd
Modified:
3 years, 10 months ago
CC:
chromium-reviews, gogerald+paymentswatch_chromium.org, rouslan+payments_chromium.org, sebsg+paymentswatch_chromium.org, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Web Payments] Add a mechanism to build item lists in the PR dialog. This CL adds the PaymentRequestItemList class and uses it in the payment method selection screen to display the list of available credit cards. This class is meant to be used in all places in the PR dialog where there are lists (payment method, shipping address, billing address selection screens). BUG=679835 Review-Url: https://codereview.chromium.org/2695653004 Cr-Commit-Position: refs/heads/master@{#452224} Committed: https://chromium.googlesource.com/chromium/src/+/75bc466a32b5f692de641e036712861c5a2f2390

Patch Set 1 #

Total comments: 22

Patch Set 2 : Rebase #

Patch Set 3 : Address comments. #

Total comments: 4

Patch Set 4 : Fix up some comments. #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+291 lines, -48 lines) Patch
M chrome/browser/ui/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_method_view_controller.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_method_view_controller.cc View 1 2 2 chunks +114 lines, -13 lines 0 comments Download
A chrome/browser/ui/views/payments/payment_request_item_list.h View 1 chunk +66 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/payments/payment_request_item_list.cc View 1 1 chunk +49 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_sheet_controller.h View 1 2 3 2 chunks +12 lines, -1 line 2 comments Download
M chrome/browser/ui/views/payments/payment_request_sheet_controller.cc View 1 2 chunks +11 lines, -13 lines 2 comments Download
M chrome/browser/ui/views/payments/payment_request_views_util.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_sheet_view_controller.cc View 1 2 chunks +1 line, -3 lines 0 comments Download
M components/payments/payment_request.h View 1 2 3 chunks +8 lines, -2 lines 0 comments Download
M components/payments/payment_request.cc View 1 2 5 chunks +22 lines, -16 lines 1 comment Download

Messages

Total messages: 16 (6 generated)
anthonyvd
Hi guys, Can you please take a look at this patch? It a first pass ...
3 years, 10 months ago (2017-02-13 19:25:06 UTC) #2
please use gerrit instead
https://codereview.chromium.org/2695653004/diff/1/chrome/browser/ui/views/payments/payment_method_view_controller.cc File chrome/browser/ui/views/payments/payment_method_view_controller.cc (right): https://codereview.chromium.org/2695653004/diff/1/chrome/browser/ui/views/payments/payment_method_view_controller.cc#newcode47 chrome/browser/ui/views/payments/payment_method_view_controller.cc:47: explicit PaymentMethodListItem(autofill::CreditCard* card) : card_(card) {} // Does not ...
3 years, 10 months ago (2017-02-14 00:29:14 UTC) #3
anthonyvd
Thanks for the review. Comments addressed. https://codereview.chromium.org/2695653004/diff/1/chrome/browser/ui/views/payments/payment_method_view_controller.cc File chrome/browser/ui/views/payments/payment_method_view_controller.cc (right): https://codereview.chromium.org/2695653004/diff/1/chrome/browser/ui/views/payments/payment_method_view_controller.cc#newcode47 chrome/browser/ui/views/payments/payment_method_view_controller.cc:47: explicit PaymentMethodListItem(autofill::CreditCard* card) ...
3 years, 10 months ago (2017-02-22 20:15:21 UTC) #4
please use gerrit instead
nit: After addressing comments and uploading a new patch that is ready for review, please ...
3 years, 10 months ago (2017-02-22 20:26:28 UTC) #5
tmartino
lgtm Did a pass on structure only. Discussed naming concerns with anthonyvd offline, agreed to ...
3 years, 10 months ago (2017-02-22 20:36:28 UTC) #6
anthonyvd
https://codereview.chromium.org/2695653004/diff/40001/chrome/browser/ui/views/payments/payment_request_sheet_controller.h File chrome/browser/ui/views/payments/payment_request_sheet_controller.h (right): https://codereview.chromium.org/2695653004/diff/40001/chrome/browser/ui/views/payments/payment_request_sheet_controller.h#newcode55 chrome/browser/ui/views/payments/payment_request_sheet_controller.h:55: // enabled state). See comment on CreatePaymentView for an ...
3 years, 10 months ago (2017-02-22 20:55:06 UTC) #7
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/2695653004/60001
3 years, 10 months ago (2017-02-22 20:55:45 UTC) #10
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/75bc466a32b5f692de641e036712861c5a2f2390
3 years, 10 months ago (2017-02-22 22:05:27 UTC) #13
Mathieu
https://codereview.chromium.org/2695653004/diff/60001/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc File chrome/browser/ui/views/payments/payment_request_sheet_controller.cc (left): https://codereview.chromium.org/2695653004/diff/60001/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc#oldcode100 chrome/browser/ui/views/payments/payment_request_sheet_controller.cc:100: layout->AddView(CreateLeadingFooterView().release()); This accidentally removed The leading footer view, can ...
3 years, 10 months ago (2017-02-22 23:00:33 UTC) #15
Mathieu
3 years, 10 months ago (2017-02-23 00:39:07 UTC) #16
Message was sent while issue was closed.
More after-the-fact comments!

https://codereview.chromium.org/2695653004/diff/60001/chrome/browser/ui/views...
File chrome/browser/ui/views/payments/payment_request_sheet_controller.cc
(left):

https://codereview.chromium.org/2695653004/diff/60001/chrome/browser/ui/views...
chrome/browser/ui/views/payments/payment_request_sheet_controller.cc:95:
layout->SetInsets(kFooterVerticalInset, kFooterHorizontalInset,
also I don't think this should be removed, since it sets the padding for the
whole footer and the extra/leading view and the button container don't have to
worry how they are being positioned in the footer.

https://codereview.chromium.org/2695653004/diff/60001/chrome/browser/ui/views...
File chrome/browser/ui/views/payments/payment_request_sheet_controller.h
(right):

https://codereview.chromium.org/2695653004/diff/60001/chrome/browser/ui/views...
chrome/browser/ui/views/payments/payment_request_sheet_controller.h:38: virtual
std::unique_ptr<views::View> CreateLeadingFooterView();
Admittedly I should have made this protected, similar to CreatePrimaryButton

https://codereview.chromium.org/2695653004/diff/60001/chrome/browser/ui/views...
chrome/browser/ui/views/payments/payment_request_sheet_controller.h:67: virtual
std::unique_ptr<views::View> CreateExtraView();
We should keep one of CreateExtraView or CreateLeadingFooterView

https://codereview.chromium.org/2695653004/diff/60001/components/payments/pay...
File components/payments/payment_request.cc (right):

https://codereview.chromium.org/2695653004/diff/60001/components/payments/pay...
components/payments/payment_request.cc:132: const
std::vector<autofill::CreditCard*>& PaymentRequest::credit_cards() {
this can go in the .h?

Powered by Google App Engine
This is Rietveld 408576698