Index: chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
diff --git a/chrome/browser/ui/views/payments/payment_request_sheet_controller.h b/chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
index 5aa37b512029582340d3b2569b894555bb72f3cf..1ea621f8f82287caec9b651d2fe3adc7354537fe 100644 |
--- a/chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
+++ b/chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
@@ -92,6 +92,14 @@ class PaymentRequestSheetController : public views::ButtonListener { |
// |controller| is installed as the listener for button events. |
std::unique_ptr<views::View> CreateFooterView(); |
+ // Returns the view that should be initially focused on this sheet. Typically, |
+ // this returns the primary button if it's enabled or the secondary button |
+ // otherwise. Subclasses may return a different view if they need focus to |
+ // start off on a different view (a textfield for example). This will only be |
+ // called after the view has been completely created through calls to |
+ // CreatePaymentView and related functions. |
+ virtual views::View* GetFirstFocusedView(); |
+ |
private: |
// Creates a view to be displayed in the PaymentRequestDialog. |
// |header_view| is the view displayed on top of the dialog, containing title, |
@@ -122,6 +130,8 @@ class PaymentRequestSheetController : public views::ButtonListener { |
// Hold on to the ScrollView because it must be explicitly laid out in some |
Mathieu
2017/05/02 13:16:10
update/split comment to reflect more variables
anthonyvd
2017/05/02 13:43:32
Done.
|
// cases. |
std::unique_ptr<views::ScrollView> scroll_; |
+ std::unique_ptr<views::Button> primary_button_; |
+ std::unique_ptr<views::Button> secondary_button_; |
DISALLOW_COPY_AND_ASSIGN(PaymentRequestSheetController); |
}; |