| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 SetupSpinnerOverlay(); | 78 SetupSpinnerOverlay(); |
| 79 | 79 |
| 80 ShowInitialPaymentSheet(); | 80 ShowInitialPaymentSheet(); |
| 81 | 81 |
| 82 chrome::RecordDialogCreation(chrome::DialogIdentifier::PAYMENT_REQUEST); | 82 chrome::RecordDialogCreation(chrome::DialogIdentifier::PAYMENT_REQUEST); |
| 83 } | 83 } |
| 84 | 84 |
| 85 PaymentRequestDialogView::~PaymentRequestDialogView() {} | 85 PaymentRequestDialogView::~PaymentRequestDialogView() {} |
| 86 | 86 |
| 87 void PaymentRequestDialogView::RequestFocus() { |
| 88 view_stack_->RequestFocus(); |
| 89 } |
| 90 |
| 87 ui::ModalType PaymentRequestDialogView::GetModalType() const { | 91 ui::ModalType PaymentRequestDialogView::GetModalType() const { |
| 88 return ui::MODAL_TYPE_CHILD; | 92 return ui::MODAL_TYPE_CHILD; |
| 89 } | 93 } |
| 90 | 94 |
| 91 views::View* PaymentRequestDialogView::GetInitiallyFocusedView() { | 95 views::View* PaymentRequestDialogView::GetInitiallyFocusedView() { |
| 92 return view_stack_.get(); | 96 return view_stack_.get(); |
| 93 } | 97 } |
| 94 | 98 |
| 95 bool PaymentRequestDialogView::Cancel() { | 99 bool PaymentRequestDialogView::Cancel() { |
| 96 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 100 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 // When a view that is associated with a controller is removed from this | 375 // When a view that is associated with a controller is removed from this |
| 372 // view's descendants, dispose of the controller. | 376 // view's descendants, dispose of the controller. |
| 373 if (!details.is_add && | 377 if (!details.is_add && |
| 374 controller_map_.find(details.child) != controller_map_.end()) { | 378 controller_map_.find(details.child) != controller_map_.end()) { |
| 375 DCHECK(!details.move_view); | 379 DCHECK(!details.move_view); |
| 376 controller_map_.erase(details.child); | 380 controller_map_.erase(details.child); |
| 377 } | 381 } |
| 378 } | 382 } |
| 379 | 383 |
| 380 } // namespace payments | 384 } // namespace payments |
| OLD | NEW |