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

Issue 2649683002: [Payments] Improve the closing of the PR dialog. (Closed)

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

Description

[Payments] Improve the closing of the PR dialog. Various changes around the dialog's disappearance. * The PaymentRequest object, through its delegate, can now close the dialog. This will need to happen if the Mojo pipe is closed by the renderer (can happen on failure or success of the PR logic). * Similarly, when the user closes the dialog through an explicit action, the PaymentRequest object will inform the renderer and subsequently self destruct (this is not new but is improved) * Some logic is added to avoid cycles: if the dialog is closing and it informs PaymentRequest, PaymentRequest will not ask to close it again (and vice versa). This is done through closing the bindings. * abort() is implemented, it currently simply returns onAbort(true) to the caller (to be improved). * As a result of the Mojo connection closing on navigation, reload, etc, the dialog will now close too. * PaymentRequestDialog is renamed PaymentRequestDialogView and implements a new interface, PaymentRequestDialog. * The tests are now a WidgetObserver to be warned of all possible closures of the dialog. BUG=683731, 679245 TEST=PaymentRequest interactive_ui_tests Review-Url: https://codereview.chromium.org/2649683002 Cr-Commit-Position: refs/heads/master@{#445652} Committed: https://chromium.googlesource.com/chromium/src/+/f4bc50e24731fad2ef8ac320f6347aa60fe70532

Patch Set 1 : Initial #

Total comments: 12

Patch Set 2 : addressed comments #

Total comments: 10

Patch Set 3 : nits #

Total comments: 6

Patch Set 4 : addressed comments from sky #

Unified diffs Side-by-side diffs Delta from patch set Stats (+316 lines, -338 lines) Patch
M chrome/browser/payments/chrome_payment_request_delegate.h View 1 chunk +9 lines, -1 line 0 comments Download
M chrome/browser/payments/chrome_payment_request_delegate.cc View 1 2 1 chunk +14 lines, -4 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser_dialogs.h View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/views/payments/order_summary_view_controller.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/payments/order_summary_view_controller.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_method_view_controller.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_method_view_controller.cc View 1 2 chunks +4 lines, -3 lines 0 comments Download
D chrome/browser/ui/views/payments/payment_request_dialog.h View 1 chunk +0 lines, -82 lines 0 comments Download
D chrome/browser/ui/views/payments/payment_request_dialog.cc View 1 chunk +0 lines, -145 lines 0 comments Download
A + chrome/browser/ui/views/payments/payment_request_dialog_view.h View 1 2 3 4 chunks +22 lines, -19 lines 0 comments Download
A + chrome/browser/ui/views/payments/payment_request_dialog_view.cc View 1 2 3 6 chunks +34 lines, -34 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_interactive_uitest.cc View 1 2 3 2 chunks +62 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h View 1 2 3 5 chunks +21 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.cc View 1 2 3 3 chunks +24 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_sheet_controller.h View 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_sheet_view_controller.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_sheet_view_controller.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/payments/test_chrome_payment_request_delegate.h View 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/payments/test_chrome_payment_request_delegate.cc View 1 2 3 1 chunk +19 lines, -6 lines 0 comments Download
M components/payments/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/payments/payment_request.h View 1 1 chunk +11 lines, -3 lines 0 comments Download
M components/payments/payment_request.cc View 1 4 chunks +39 lines, -9 lines 0 comments Download
M components/payments/payment_request_delegate.h View 1 chunk +5 lines, -1 line 0 comments Download
A components/payments/payment_request_dialog.h View 1 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (20 generated)
Mathieu
Hi, PTAL Rouslan: everything :) sky: browser/ui review
3 years, 11 months ago (2017-01-22 21:47:51 UTC) #8
please use gerrit instead
So happy you're looking into this! We need this to be solid :-D https://codereview.chromium.org/2649683002/diff/60001/chrome/browser/ui/views/payments/payment_request_dialog_view.h File ...
3 years, 11 months ago (2017-01-23 15:02:08 UTC) #13
Mathieu
Thanks Rouslan, I think everything is covered, PTAL! https://codereview.chromium.org/2649683002/diff/60001/chrome/browser/ui/views/payments/payment_request_dialog_view.h File chrome/browser/ui/views/payments/payment_request_dialog_view.h (right): https://codereview.chromium.org/2649683002/diff/60001/chrome/browser/ui/views/payments/payment_request_dialog_view.h#newcode62 chrome/browser/ui/views/payments/payment_request_dialog_view.h:62: views::Widget* ...
3 years, 11 months ago (2017-01-23 20:58:36 UTC) #17
please use gerrit instead
LGTM % nits Wonderful code! :-D https://codereview.chromium.org/2649683002/diff/100001/chrome/browser/payments/chrome_payment_request_delegate.cc File chrome/browser/payments/chrome_payment_request_delegate.cc (right): https://codereview.chromium.org/2649683002/diff/100001/chrome/browser/payments/chrome_payment_request_delegate.cc#newcode19 chrome/browser/payments/chrome_payment_request_delegate.cc:19: void ChromePaymentRequestDelegate::ShowDialog(PaymentRequest* request) ...
3 years, 11 months ago (2017-01-23 21:18:50 UTC) #18
Mathieu
Thanks! https://codereview.chromium.org/2649683002/diff/100001/chrome/browser/payments/chrome_payment_request_delegate.cc File chrome/browser/payments/chrome_payment_request_delegate.cc (right): https://codereview.chromium.org/2649683002/diff/100001/chrome/browser/payments/chrome_payment_request_delegate.cc#newcode19 chrome/browser/payments/chrome_payment_request_delegate.cc:19: void ChromePaymentRequestDelegate::ShowDialog(PaymentRequest* request) { On 2017/01/23 21:18:50, rouslan ...
3 years, 11 months ago (2017-01-23 21:53:58 UTC) #20
sky
https://codereview.chromium.org/2649683002/diff/120001/chrome/browser/ui/views/payments/payment_request_dialog_view.h File chrome/browser/ui/views/payments/payment_request_dialog_view.h (right): https://codereview.chromium.org/2649683002/diff/120001/chrome/browser/ui/views/payments/payment_request_dialog_view.h#newcode62 chrome/browser/ui/views/payments/payment_request_dialog_view.h:62: views::Widget* widget_for_testing() { return widget_for_testing_; } Why can't you ...
3 years, 11 months ago (2017-01-24 00:45:02 UTC) #22
Mathieu
Hi Scott, PTAL! https://codereview.chromium.org/2649683002/diff/120001/chrome/browser/ui/views/payments/payment_request_dialog_view.h File chrome/browser/ui/views/payments/payment_request_dialog_view.h (right): https://codereview.chromium.org/2649683002/diff/120001/chrome/browser/ui/views/payments/payment_request_dialog_view.h#newcode62 chrome/browser/ui/views/payments/payment_request_dialog_view.h:62: views::Widget* widget_for_testing() { return widget_for_testing_; } ...
3 years, 11 months ago (2017-01-24 01:11:40 UTC) #23
sky
LGTM
3 years, 11 months ago (2017-01-24 03:09:38 UTC) #24
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/2649683002/140001
3 years, 11 months ago (2017-01-24 03:22:31 UTC) #27
commit-bot: I haz the power
3 years, 11 months ago (2017-01-24 05:18:57 UTC) #30
Message was sent while issue was closed.
Committed patchset #4 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/f4bc50e24731fad2ef8ac320f634...

Powered by Google App Engine
This is Rietveld 408576698