Chromium Code Reviews| Index: chrome/browser/ui/views/payments/editor_view_controller.h |
| diff --git a/chrome/browser/ui/views/payments/editor_view_controller.h b/chrome/browser/ui/views/payments/editor_view_controller.h |
| index 60e229c09fda672f524ec42b19d816fb628b4f12..c34fd966ec023de3ff40dc4a886108de73d1237a 100644 |
| --- a/chrome/browser/ui/views/payments/editor_view_controller.h |
| +++ b/chrome/browser/ui/views/payments/editor_view_controller.h |
| @@ -109,9 +109,11 @@ class EditorViewController : public PaymentRequestSheetController, |
| protected: |
| // Create a header view to be inserted before all fields. |
| virtual std::unique_ptr<views::View> CreateHeaderView(); |
| - // Create a custom view for the specified |type|. |
| + // |focusable_field| is to be set with a pointer to the view that should get |
| + // default focus within the custom view. |
| virtual std::unique_ptr<views::View> CreateCustomFieldView( |
| - autofill::ServerFieldType type); |
| + autofill::ServerFieldType type, |
| + views::View** focusable_field); |
| // Create an extra view to go to the right of the field with |type|, which |
| // can either be a textfield, combobox, or custom view. |
| virtual std::unique_ptr<views::View> CreateExtraViewForField( |
| @@ -159,8 +161,11 @@ class EditorViewController : public PaymentRequestSheetController, |
| // Adds some views to |layout|, to represent an input field and its labels. |
| // |field| is the field definition, which contains the label and the hint |
| // about the length of the input field. A placeholder error label is also |
| - // added (see implementation). |
| - void CreateInputField(views::GridLayout* layout, const EditorField& field); |
| + // added (see implementation). Returns the input view for this field that |
| + // could be focused if the caller identifies it as the first one, and there |
| + // are no field identified as invalid once all the fields are created. |
|
anthonyvd
2017/05/18 18:12:25
nit: field -> fields
MAD
2017/05/18 20:31:19
Done.
|
| + views::View* CreateInputField(views::GridLayout* layout, |
| + const EditorField& field); |
| // Returns the widest column width of across all extra views of a certain |
| // |size| type. |
| @@ -175,8 +180,8 @@ class EditorViewController : public PaymentRequestSheetController, |
| // Tracks the relationship between a field and its error label. |
| ErrorLabelMap error_labels_; |
| - // The first label in the editor, used to set the initial focus. |
| - views::View* first_field_view_; |
| + // The input field view in the editor used to set the initial focus. |
| + views::View* initial_focus_field_view_; |
| // Identifies where to go back when the editing completes successfully. |
| BackNavigationType back_navigation_type_; |