| 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.h" | 5 #include "chrome/browser/ui/views/payments/payment_request_dialog.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" |
| 11 #include "chrome/browser/payments/payment_request_impl.h" | |
| 12 #include "chrome/browser/ui/views/payments/order_summary_view_controller.h" | 11 #include "chrome/browser/ui/views/payments/order_summary_view_controller.h" |
| 13 #include "chrome/browser/ui/views/payments/payment_sheet_view_controller.h" | 12 #include "chrome/browser/ui/views/payments/payment_sheet_view_controller.h" |
| 14 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
| 15 #include "components/constrained_window/constrained_window_views.h" | 14 #include "components/constrained_window/constrained_window_views.h" |
| 15 #include "components/payments/payment_request_impl.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/views/layout/fill_layout.h" | 18 #include "ui/views/layout/fill_layout.h" |
| 19 | 19 |
| 20 namespace chrome { | 20 namespace chrome { |
| 21 | 21 |
| 22 void ShowPaymentRequestDialog(payments::PaymentRequestImpl* impl) { | 22 void ShowPaymentRequestDialog(payments::PaymentRequestImpl* impl) { |
| 23 constrained_window::ShowWebModalDialogViews( | 23 constrained_window::ShowWebModalDialogViews( |
| 24 new payments::PaymentRequestDialog(impl), impl->web_contents()); | 24 new payments::PaymentRequestDialog(impl), impl->web_contents()); |
| 25 } | 25 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // When a view that is associated with a controller is removed from this | 118 // When a view that is associated with a controller is removed from this |
| 119 // view's descendants, dispose of the controller. | 119 // view's descendants, dispose of the controller. |
| 120 if (!details.is_add && | 120 if (!details.is_add && |
| 121 controller_map_.find(details.child) != controller_map_.end()) { | 121 controller_map_.find(details.child) != controller_map_.end()) { |
| 122 DCHECK(!details.move_view); | 122 DCHECK(!details.move_view); |
| 123 controller_map_.erase(details.child); | 123 controller_map_.erase(details.child); |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace payments | 127 } // namespace payments |
| OLD | NEW |