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

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

Issue 2709093006: Adding new shipping address editor view to payment flow. (Closed)
Patch Set: Bot failure fix Created 3 years, 9 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 ff354aa70e800db42a22d067773f2b69a9aaf3fe..f5660203f2403f7c8798ba4605d285f6bd3a7318 100644
--- a/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
+++ b/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/views/payments/payment_method_view_controller.h"
#include "chrome/browser/ui/views/payments/payment_sheet_view_controller.h"
#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/constrained_window/constrained_window_views.h"
#include "components/payments/content/payment_request.h"
@@ -143,6 +144,8 @@ void PaymentRequestDialogView::ShowShippingProfileSheet() {
request_->spec(), request_->state(), this),
&controller_map_),
/* animate = */ true);
+ if (observer_for_testing_)
+ observer_for_testing_->OnShippingSectionOpened();
}
void PaymentRequestDialogView::ShowShippingOptionSheet() {
@@ -163,6 +166,21 @@ void PaymentRequestDialogView::ShowCreditCardEditor() {
observer_for_testing_->OnCreditCardEditorOpened();
}
+void PaymentRequestDialogView::ShowShippingAddressEditor() {
+ view_stack_.Push(CreateViewAndInstallController(
+ base::MakeUnique<ShippingAddressEditorViewController>(
+ request_->spec(), request_->state(), this),
+ &controller_map_),
+ /* animate = */ true);
+ if (observer_for_testing_)
+ observer_for_testing_->OnShippingAddressEditorOpened();
+}
+
+void PaymentRequestDialogView::EditorViewUpdated() {
+ if (observer_for_testing_)
+ observer_for_testing_->OnEditorViewUpdated();
+}
+
void PaymentRequestDialogView::ShowDialog() {
constrained_window::ShowWebModalDialogViews(this, request_->web_contents());
}

Powered by Google App Engine
This is Rietveld 408576698