Chromium Code Reviews| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 request_->Pay(); | 145 request_->Pay(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void PaymentRequestDialogView::GoBack() { | 148 void PaymentRequestDialogView::GoBack() { |
| 149 view_stack_->Pop(); | 149 view_stack_->Pop(); |
| 150 | 150 |
| 151 if (observer_for_testing_) | 151 if (observer_for_testing_) |
| 152 observer_for_testing_->OnBackNavigation(); | 152 observer_for_testing_->OnBackNavigation(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void PaymentRequestDialogView::GoBackToPaymentSheet() { | |
| 156 if (view_stack_->size() > 1) | |
|
Mathieu
2017/04/13 16:55:23
Add comment:
// This assumes that the Payment She
anthonyvd
2017/04/13 20:22:58
Done.
| |
| 157 view_stack_->PopMany(view_stack_->size() - 1); | |
| 158 } | |
| 159 | |
| 155 void PaymentRequestDialogView::ShowContactProfileSheet() { | 160 void PaymentRequestDialogView::ShowContactProfileSheet() { |
| 156 view_stack_->Push( | 161 view_stack_->Push( |
| 157 CreateViewAndInstallController( | 162 CreateViewAndInstallController( |
| 158 ProfileListViewController::GetContactProfileViewController( | 163 ProfileListViewController::GetContactProfileViewController( |
| 159 request_->spec(), request_->state(), this), | 164 request_->spec(), request_->state(), this), |
| 160 &controller_map_), | 165 &controller_map_), |
| 161 /* animate */ true); | 166 /* animate */ true); |
| 162 if (observer_for_testing_) | 167 if (observer_for_testing_) |
| 163 observer_for_testing_->OnContactInfoOpened(); | 168 observer_for_testing_->OnContactInfoOpened(); |
| 164 } | 169 } |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 // When a view that is associated with a controller is removed from this | 320 // When a view that is associated with a controller is removed from this |
| 316 // view's descendants, dispose of the controller. | 321 // view's descendants, dispose of the controller. |
| 317 if (!details.is_add && | 322 if (!details.is_add && |
| 318 controller_map_.find(details.child) != controller_map_.end()) { | 323 controller_map_.find(details.child) != controller_map_.end()) { |
| 319 DCHECK(!details.move_view); | 324 DCHECK(!details.move_view); |
| 320 controller_map_.erase(details.child); | 325 controller_map_.erase(details.child); |
| 321 } | 326 } |
| 322 } | 327 } |
| 323 | 328 |
| 324 } // namespace payments | 329 } // namespace payments |
| OLD | NEW |