OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_EDITOR_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_EDITOR_VIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_EDITOR_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_EDITOR_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 virtual bool ValidateModelAndSave() = 0; | 125 virtual bool ValidateModelAndSave() = 0; |
126 // Creates a ValidationDelegate which knows how to validate for a given | 126 // Creates a ValidationDelegate which knows how to validate for a given |
127 // |field| definition. | 127 // |field| definition. |
128 virtual std::unique_ptr<ValidationDelegate> CreateValidationDelegate( | 128 virtual std::unique_ptr<ValidationDelegate> CreateValidationDelegate( |
129 const EditorField& field) = 0; | 129 const EditorField& field) = 0; |
130 virtual std::unique_ptr<ui::ComboboxModel> GetComboboxModelForType( | 130 virtual std::unique_ptr<ui::ComboboxModel> GetComboboxModelForType( |
131 const autofill::ServerFieldType& type) = 0; | 131 const autofill::ServerFieldType& type) = 0; |
132 | 132 |
133 // PaymentRequestSheetController; | 133 // PaymentRequestSheetController; |
134 std::unique_ptr<views::Button> CreatePrimaryButton() override; | 134 std::unique_ptr<views::Button> CreatePrimaryButton() override; |
| 135 base::string16 GetSecondaryButtonLabel() override; |
135 void FillContentView(views::View* content_view) override; | 136 void FillContentView(views::View* content_view) override; |
136 std::unique_ptr<views::View> CreateExtraFooterView() override; | |
137 | 137 |
138 // views::ComboboxListener: | 138 // views::ComboboxListener: |
139 void OnPerformAction(views::Combobox* combobox) override; | 139 void OnPerformAction(views::Combobox* combobox) override; |
140 | 140 |
141 // Update the editor view by removing all it's child views and recreating | 141 // Update the editor view by removing all it's child views and recreating |
142 // the input fields returned by GetFieldDefinitions. Note that | 142 // the input fields returned by GetFieldDefinitions. Note that |
143 // CreateEditorView MUST have been called at least once before calling | 143 // CreateEditorView MUST have been called at least once before calling |
144 // UpdateEditorView. | 144 // UpdateEditorView. |
145 virtual void UpdateEditorView(); | 145 virtual void UpdateEditorView(); |
146 | 146 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 // Identifies where to go back when the editing completes successfully. | 182 // Identifies where to go back when the editing completes successfully. |
183 BackNavigationType back_navigation_type_; | 183 BackNavigationType back_navigation_type_; |
184 | 184 |
185 DISALLOW_COPY_AND_ASSIGN(EditorViewController); | 185 DISALLOW_COPY_AND_ASSIGN(EditorViewController); |
186 }; | 186 }; |
187 | 187 |
188 } // namespace payments | 188 } // namespace payments |
189 | 189 |
190 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_EDITOR_VIEW_CONTROLLER_H_ | 190 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_EDITOR_VIEW_CONTROLLER_H_ |
OLD | NEW |