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 return 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 // When a view that is associated with a controller is removed from this | 365 // When a view that is associated with a controller is removed from this |
362 // view's descendants, dispose of the controller. | 366 // view's descendants, dispose of the controller. |
363 if (!details.is_add && | 367 if (!details.is_add && |
364 controller_map_.find(details.child) != controller_map_.end()) { | 368 controller_map_.find(details.child) != controller_map_.end()) { |
365 DCHECK(!details.move_view); | 369 DCHECK(!details.move_view); |
366 controller_map_.erase(details.child); | 370 controller_map_.erase(details.child); |
367 } | 371 } |
368 } | 372 } |
369 | 373 |
370 } // namespace payments | 374 } // namespace payments |
OLD | NEW |