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

Unified Diff: chrome/browser/ui/views/payments/payment_request_dialog_view.cc

Issue 2805263003: [Payments] Selecting incomplete items will open editors (Closed)
Patch Set: fix ios test for realz Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/payments/payment_request_dialog_view.cc
diff --git a/chrome/browser/ui/views/payments/payment_request_dialog_view.cc b/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
index 9f239fe9bc9b9b7c7cbe7bc5a69f832cf5905744..907de5f075cf00aaa52743e65f3920a3cd56e131 100644
--- a/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
+++ b/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
@@ -18,6 +18,8 @@
#include "chrome/browser/ui/views/payments/profile_list_view_controller.h"
#include "chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h"
#include "chrome/browser/ui/views/payments/shipping_option_view_controller.h"
+#include "components/autofill/core/browser/autofill_profile.h"
+#include "components/autofill/core/browser/credit_card.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/payments/content/payment_request.h"
#include "components/strings/grit/components_strings.h"
@@ -212,20 +214,23 @@ void PaymentRequestDialogView::ShowCvcUnmaskPrompt(
observer_for_testing_->OnCvcPromptShown();
}
-void PaymentRequestDialogView::ShowCreditCardEditor() {
- view_stack_.Push(CreateViewAndInstallController(
- base::MakeUnique<CreditCardEditorViewController>(
- request_->spec(), request_->state(), this),
- &controller_map_),
- /* animate = */ true);
+void PaymentRequestDialogView::ShowCreditCardEditor(
+ autofill::CreditCard* credit_card) {
+ view_stack_.Push(
+ CreateViewAndInstallController(
+ base::MakeUnique<CreditCardEditorViewController>(
+ request_->spec(), request_->state(), this, credit_card),
+ &controller_map_),
+ /* animate = */ true);
if (observer_for_testing_)
observer_for_testing_->OnCreditCardEditorOpened();
}
-void PaymentRequestDialogView::ShowShippingAddressEditor() {
+void PaymentRequestDialogView::ShowShippingAddressEditor(
+ autofill::AutofillProfile* profile) {
view_stack_.Push(CreateViewAndInstallController(
base::MakeUnique<ShippingAddressEditorViewController>(
- request_->spec(), request_->state(), this),
+ request_->spec(), request_->state(), this, profile),
&controller_map_),
/* animate = */ true);
if (observer_for_testing_)

Powered by Google App Engine
This is Rietveld 408576698