| 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 true); | 104 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 true); | 113 true); |
| 111 } | 114 } |
| 112 | 115 |
| 113 void PaymentRequestDialogView::ShowDialog() { | 116 void PaymentRequestDialogView::ShowDialog() { |
| 114 constrained_window::ShowWebModalDialogViews(this, request_->web_contents()); | 117 constrained_window::ShowWebModalDialogViews(this, request_->web_contents()); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 136 // When a view that is associated with a controller is removed from this | 139 // When a view that is associated with a controller is removed from this |
| 137 // view's descendants, dispose of the controller. | 140 // view's descendants, dispose of the controller. |
| 138 if (!details.is_add && | 141 if (!details.is_add && |
| 139 controller_map_.find(details.child) != controller_map_.end()) { | 142 controller_map_.find(details.child) != controller_map_.end()) { |
| 140 DCHECK(!details.move_view); | 143 DCHECK(!details.move_view); |
| 141 controller_map_.erase(details.child); | 144 controller_map_.erase(details.child); |
| 142 } | 145 } |
| 143 } | 146 } |
| 144 | 147 |
| 145 } // namespace payments | 148 } // namespace payments |
| OLD | NEW |