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

Issue 2668063003: [Web Payments] Add Cancel button to all sheets (Closed)

Created:
3 years, 10 months ago by anthonyvd
Modified:
3 years, 10 months ago
CC:
chromium-reviews, tfarina, tmartino
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Web Payments] Add Cancel button to all sheets This CL refactors a bit of the Controller code to add a Cancel button to all sheets. The base PaymentRequestSheetController class handles clicks on the Cancel button (and other buttons that are common to multiple sheets, like the back arrow). This CL also adds a function to build the button row of the dialog. Currently, this function only creates and lays out the Cancel button. BUG=687339 Review-Url: https://codereview.chromium.org/2668063003 Cr-Commit-Position: refs/heads/master@{#448266} Committed: https://chromium.googlesource.com/chromium/src/+/1b084b11b0404e4fec76c5ab372ef39226596dc0

Patch Set 1 #

Total comments: 9

Patch Set 2 : Address feedback. #

Patch Set 3 : Address feedback about footer row creation. #

Total comments: 5

Patch Set 4 : Move a comment. #

Total comments: 8

Patch Set 5 : Address feedback and add OWNERS file. #

Patch Set 6 : Rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+179 lines, -128 lines) Patch
M chrome/browser/ui/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A chrome/browser/ui/views/payments/OWNERS View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/order_summary_view_controller.h View 3 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/ui/views/payments/order_summary_view_controller.cc View 1 2 2 chunks +1 line, -15 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_method_view_controller.h View 3 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_method_view_controller.cc View 1 2 1 chunk +0 lines, -14 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_sheet_controller.h View 1 2 3 4 3 chunks +41 lines, -8 lines 0 comments Download
A chrome/browser/ui/views/payments/payment_request_sheet_controller.cc View 1 2 3 4 1 chunk +127 lines, -0 lines 1 comment Download
M chrome/browser/ui/views/payments/payment_request_views_util.h View 1 2 3 1 chunk +0 lines, -17 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_views_util.cc View 1 2 2 chunks +0 lines, -33 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_sheet_view_controller.h View 3 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_sheet_view_controller.cc View 1 2 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/payments/shipping_list_view_controller.h View 3 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/ui/views/payments/shipping_list_view_controller.cc View 1 2 1 chunk +0 lines, -14 lines 0 comments Download

Messages

Total messages: 24 (6 generated)
anthonyvd
Hi guys, Can you PTAL at this CL to add the cancel button and centralize ...
3 years, 10 months ago (2017-01-31 22:33:10 UTC) #2
Mathieu
Very cool! I have a question https://codereview.chromium.org/2668063003/diff/1/chrome/browser/ui/views/payments/payment_request_views_util.h File chrome/browser/ui/views/payments/payment_request_views_util.h (right): https://codereview.chromium.org/2668063003/diff/1/chrome/browser/ui/views/payments/payment_request_views_util.h#newcode54 chrome/browser/ui/views/payments/payment_request_views_util.h:54: // |content_view| is ...
3 years, 10 months ago (2017-01-31 22:53:12 UTC) #3
please use gerrit instead
lgtm % comments and what Mathieu says. https://codereview.chromium.org/2668063003/diff/1/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/2668063003/diff/1/chrome/browser/ui/views/payments/payment_request_sheet_controller.h#newcode10 chrome/browser/ui/views/payments/payment_request_sheet_controller.h:10: #include "base/logging.h" ...
3 years, 10 months ago (2017-02-01 14:33:35 UTC) #4
anthonyvd
Thanks, addressed feedback and replied to comments! https://codereview.chromium.org/2668063003/diff/1/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/2668063003/diff/1/chrome/browser/ui/views/payments/payment_request_sheet_controller.h#newcode10 chrome/browser/ui/views/payments/payment_request_sheet_controller.h:10: #include "base/logging.h" ...
3 years, 10 months ago (2017-02-01 15:35:23 UTC) #5
Mathieu
https://codereview.chromium.org/2668063003/diff/1/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc File chrome/browser/ui/views/payments/payment_sheet_view_controller.cc (right): https://codereview.chromium.org/2668063003/diff/1/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc#newcode202 chrome/browser/ui/views/payments/payment_sheet_view_controller.cc:202: CreateButtonsView(this)); On 2017/02/01 15:35:23, anthonyvd wrote: > On 2017/01/31 ...
3 years, 10 months ago (2017-02-01 17:17:36 UTC) #6
anthonyvd
On 2017/02/01 at 17:17:36, mathp wrote: > https://codereview.chromium.org/2668063003/diff/1/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc > File chrome/browser/ui/views/payments/payment_sheet_view_controller.cc (right): > > https://codereview.chromium.org/2668063003/diff/1/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc#newcode202 ...
3 years, 10 months ago (2017-02-01 17:38:49 UTC) #7
Mathieu
On 2017/02/01 17:38:49, anthonyvd wrote: > On 2017/02/01 at 17:17:36, mathp wrote: > > > ...
3 years, 10 months ago (2017-02-01 19:08:51 UTC) #8
anthonyvd
Made the footer changes we discussed. PTAL!
3 years, 10 months ago (2017-02-02 20:29:03 UTC) #9
Mathieu
Thanks for your patience! lgtm https://codereview.chromium.org/2668063003/diff/40001/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc File chrome/browser/ui/views/payments/payment_request_sheet_controller.cc (right): https://codereview.chromium.org/2668063003/diff/40001/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc#newcode27 chrome/browser/ui/views/payments/payment_request_sheet_controller.cc:27: PaymentRequestSheetController::CreatePrimaryButton() { should we ...
3 years, 10 months ago (2017-02-02 21:04:58 UTC) #10
anthonyvd
Thanks to you for the feedback! Addressed comments. Scott, can you please do an OWNERS ...
3 years, 10 months ago (2017-02-02 21:33:24 UTC) #12
Mathieu
https://codereview.chromium.org/2668063003/diff/40001/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc File chrome/browser/ui/views/payments/payment_request_sheet_controller.cc (right): https://codereview.chromium.org/2668063003/diff/40001/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc#newcode27 chrome/browser/ui/views/payments/payment_request_sheet_controller.cc:27: PaymentRequestSheetController::CreatePrimaryButton() { On 2017/02/02 21:33:24, anthonyvd wrote: > On ...
3 years, 10 months ago (2017-02-02 21:44:15 UTC) #13
sky
How about making you and rouslan@ owners of c/b/ui/views/payments? https://codereview.chromium.org/2668063003/diff/60001/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc File chrome/browser/ui/views/payments/payment_request_sheet_controller.cc (right): https://codereview.chromium.org/2668063003/diff/60001/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc#newcode28 chrome/browser/ui/views/payments/payment_request_sheet_controller.cc:28: ...
3 years, 10 months ago (2017-02-03 02:36:50 UTC) #14
anthonyvd
Making rouslan@ and I OWNERS SGTM if you think we can handle our own views ...
3 years, 10 months ago (2017-02-03 16:50:57 UTC) #15
sky
LGTM - I'm always happy to review tricky views related changes, but it seems like ...
3 years, 10 months ago (2017-02-03 23:42:12 UTC) #16
sky
Which you did, thanks!
3 years, 10 months ago (2017-02-03 23:42:25 UTC) #17
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/2668063003/100001
3 years, 10 months ago (2017-02-06 14:52:25 UTC) #20
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/1b084b11b0404e4fec76c5ab372ef39226596dc0
3 years, 10 months ago (2017-02-06 16:15:03 UTC) #23
Mathieu
3 years, 10 months ago (2017-02-06 17:24:53 UTC) #24
Message was sent while issue was closed.
https://codereview.chromium.org/2668063003/diff/100001/chrome/browser/ui/view...
File chrome/browser/ui/views/payments/payment_request_sheet_controller.cc
(right):

https://codereview.chromium.org/2668063003/diff/100001/chrome/browser/ui/view...
chrome/browser/ui/views/payments/payment_request_sheet_controller.cc:35:
dialog()->CloseDialog();
I think for most screens, the desired behavior of the "Cancel" button should be
to GoBack() (until you are at the root, at which point you close). You may want
to double check that with UX

Powered by Google App Engine
This is Rietveld 408576698