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_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROLLER
_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROLLER
_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROLLER
_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROLLER
_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 12 matching lines...) Expand all Loading... |
23 class ShippingAddressEditorViewController : public EditorViewController { | 23 class ShippingAddressEditorViewController : public EditorViewController { |
24 public: | 24 public: |
25 // Does not take ownership of the arguments, which should outlive this object. | 25 // Does not take ownership of the arguments, which should outlive this object. |
26 ShippingAddressEditorViewController(PaymentRequestSpec* spec, | 26 ShippingAddressEditorViewController(PaymentRequestSpec* spec, |
27 PaymentRequestState* state, | 27 PaymentRequestState* state, |
28 PaymentRequestDialogView* dialog); | 28 PaymentRequestDialogView* dialog); |
29 ~ShippingAddressEditorViewController() override; | 29 ~ShippingAddressEditorViewController() override; |
30 | 30 |
31 // EditorViewController: | 31 // EditorViewController: |
32 std::unique_ptr<views::View> CreateHeaderView() override; | 32 std::unique_ptr<views::View> CreateHeaderView() override; |
33 int GetViewHeaderTitleId() const override; | |
34 std::vector<EditorField> GetFieldDefinitions() override; | 33 std::vector<EditorField> GetFieldDefinitions() override; |
35 bool ValidateModelAndSave() override; | 34 bool ValidateModelAndSave() override; |
36 std::unique_ptr<ValidationDelegate> CreateValidationDelegate( | 35 std::unique_ptr<ValidationDelegate> CreateValidationDelegate( |
37 const EditorField& field) override; | 36 const EditorField& field) override; |
38 std::unique_ptr<ui::ComboboxModel> GetComboboxModelForType( | 37 std::unique_ptr<ui::ComboboxModel> GetComboboxModelForType( |
39 const autofill::ServerFieldType& type) override; | 38 const autofill::ServerFieldType& type) override; |
40 void OnPerformAction(views::Combobox* combobox) override; | 39 void OnPerformAction(views::Combobox* combobox) override; |
41 void UpdateEditorView() override; | 40 void UpdateEditorView() override; |
42 | 41 |
| 42 // PaymentRequestSheetController: |
| 43 base::string16 GetSheetTitle() override; |
| 44 |
43 private: | 45 private: |
44 class ShippingAddressValidationDelegate : public ValidationDelegate { | 46 class ShippingAddressValidationDelegate : public ValidationDelegate { |
45 public: | 47 public: |
46 ShippingAddressValidationDelegate( | 48 ShippingAddressValidationDelegate( |
47 ShippingAddressEditorViewController* parent, | 49 ShippingAddressEditorViewController* parent, |
48 const EditorField& field); | 50 const EditorField& field); |
49 ~ShippingAddressValidationDelegate() override; | 51 ~ShippingAddressValidationDelegate() override; |
50 | 52 |
51 // ValidationDelegate: | 53 // ValidationDelegate: |
52 bool ValidateTextfield(views::Textfield* textfield) override; | 54 bool ValidateTextfield(views::Textfield* textfield) override; |
(...skipping 27 matching lines...) Expand all Loading... |
80 | 82 |
81 // Called by the validation delegate when the country combobox changed. | 83 // Called by the validation delegate when the country combobox changed. |
82 void OnCountryChanged(views::Combobox* combobox); | 84 void OnCountryChanged(views::Combobox* combobox); |
83 | 85 |
84 DISALLOW_COPY_AND_ASSIGN(ShippingAddressEditorViewController); | 86 DISALLOW_COPY_AND_ASSIGN(ShippingAddressEditorViewController); |
85 }; | 87 }; |
86 | 88 |
87 } // namespace payments | 89 } // namespace payments |
88 | 90 |
89 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROL
LER_H_ | 91 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROL
LER_H_ |
OLD | NEW |