| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |