| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // |section|. | 96 // |section|. |
| 97 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) | 97 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) |
| 98 const = 0; | 98 const = 0; |
| 99 | 99 |
| 100 // Returns the combobox model for inputs of type |type|, or NULL if the input | 100 // Returns the combobox model for inputs of type |type|, or NULL if the input |
| 101 // should be a text field. | 101 // should be a text field. |
| 102 virtual ui::ComboboxModel* ComboboxModelForAutofillType( | 102 virtual ui::ComboboxModel* ComboboxModelForAutofillType( |
| 103 AutofillFieldType type) = 0; | 103 AutofillFieldType type) = 0; |
| 104 | 104 |
| 105 // Returns the model for suggestions for fields that fall under |section|. | 105 // Returns the model for suggestions for fields that fall under |section|. |
| 106 // This may return NULL, in which case no menu should be shown for that |
| 107 // section. |
| 106 virtual ui::MenuModel* MenuModelForSection(DialogSection section) = 0; | 108 virtual ui::MenuModel* MenuModelForSection(DialogSection section) = 0; |
| 107 | 109 |
| 110 #if defined(OS_ANDROID) |
| 111 // As the above, but will never return NULL. TODO(estade): android should |
| 112 // stop relying on this and it should be removed. |
| 113 virtual ui::MenuModel* MenuModelForSectionHack(DialogSection section) = 0; |
| 114 #endif |
| 115 |
| 108 // Returns the label text used to describe the section (i.e. Billing). | 116 // Returns the label text used to describe the section (i.e. Billing). |
| 109 virtual string16 LabelForSection(DialogSection section) const = 0; | 117 virtual string16 LabelForSection(DialogSection section) const = 0; |
| 110 | 118 |
| 111 // Returns the current state of suggestions for |section|. | 119 // Returns the current state of suggestions for |section|. |
| 112 virtual SuggestionState SuggestionStateForSection(DialogSection section) = 0; | 120 virtual SuggestionState SuggestionStateForSection(DialogSection section) = 0; |
| 113 | 121 |
| 114 // Should be called when the user starts editing of the section. | 122 // Should be called when the user starts editing of the section. |
| 115 virtual void EditClickedForSection(DialogSection section) = 0; | 123 virtual void EditClickedForSection(DialogSection section) = 0; |
| 116 | 124 |
| 117 // Should be called when the user cancels editing of the section. | 125 // Should be called when the user cancels editing of the section. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // The web contents that prompted the dialog. | 191 // The web contents that prompted the dialog. |
| 184 virtual content::WebContents* web_contents() = 0; | 192 virtual content::WebContents* web_contents() = 0; |
| 185 | 193 |
| 186 protected: | 194 protected: |
| 187 virtual ~AutofillDialogController(); | 195 virtual ~AutofillDialogController(); |
| 188 }; | 196 }; |
| 189 | 197 |
| 190 } // namespace autofill | 198 } // namespace autofill |
| 191 | 199 |
| 192 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 200 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
| OLD | NEW |