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

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

Issue 2805263003: [Payments] Selecting incomplete items will open editors (Closed)
Patch Set: Initial 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 7e6b216087e14add0e3188b62564ad749f2985a9..ad31fb4af0990baf2513c57c996eabe5f9b40fb8 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 "content/public/browser/browser_thread.h"
@@ -203,20 +205,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