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

Side by Side Diff: chrome/browser/ui/views/payments/payment_request_dialog_view.cc

Issue 2656823006: [Payments] PR: Basic test for the order summary section. (Closed)
Patch Set: Rebase Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h" 5 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 void PaymentRequestDialogView::GoBack() { 97 void PaymentRequestDialogView::GoBack() {
98 view_stack_.Pop(); 98 view_stack_.Pop();
99 } 99 }
100 100
101 void PaymentRequestDialogView::ShowOrderSummary() { 101 void PaymentRequestDialogView::ShowOrderSummary() {
102 view_stack_.Push(CreateViewAndInstallController<OrderSummaryViewController>( 102 view_stack_.Push(CreateViewAndInstallController<OrderSummaryViewController>(
103 &controller_map_, request_, this), 103 &controller_map_, request_, this),
104 /* animate = */ true); 104 /* animate = */ true);
105
106 if (observer_for_testing_)
107 observer_for_testing_->OnOrderSummaryOpened();
105 } 108 }
106 109
107 void PaymentRequestDialogView::ShowPaymentMethodSheet() { 110 void PaymentRequestDialogView::ShowPaymentMethodSheet() {
108 view_stack_.Push(CreateViewAndInstallController<PaymentMethodViewController>( 111 view_stack_.Push(CreateViewAndInstallController<PaymentMethodViewController>(
109 &controller_map_, request_, this), 112 &controller_map_, request_, this),
110 /* animate = */ true); 113 /* animate = */ true);
111 } 114 }
112 115
113 void PaymentRequestDialogView::ShowShippingListSheet() { 116 void PaymentRequestDialogView::ShowShippingListSheet() {
114 view_stack_.Push(CreateViewAndInstallController<ShippingListViewController>( 117 view_stack_.Push(CreateViewAndInstallController<ShippingListViewController>(
(...skipping 27 matching lines...) Expand all
142 // When a view that is associated with a controller is removed from this 145 // When a view that is associated with a controller is removed from this
143 // view's descendants, dispose of the controller. 146 // view's descendants, dispose of the controller.
144 if (!details.is_add && 147 if (!details.is_add &&
145 controller_map_.find(details.child) != controller_map_.end()) { 148 controller_map_.find(details.child) != controller_map_.end()) {
146 DCHECK(!details.move_view); 149 DCHECK(!details.move_view);
147 controller_map_.erase(details.child); 150 controller_map_.erase(details.child);
148 } 151 }
149 } 152 }
150 153
151 } // namespace payments 154 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698