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/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 106 // This may return NULL, in which case no menu should be shown for that |
107 // section. | 107 // section. |
108 virtual ui::MenuModel* MenuModelForSection(DialogSection section) = 0; | 108 virtual ui::MenuModel* MenuModelForSection(DialogSection section) = 0; |
109 | 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 | |
116 // Returns the label text used to describe the section (i.e. Billing). | 110 // Returns the label text used to describe the section (i.e. Billing). |
117 virtual string16 LabelForSection(DialogSection section) const = 0; | 111 virtual string16 LabelForSection(DialogSection section) const = 0; |
118 | 112 |
119 // Returns the current state of suggestions for |section|. | 113 // Returns the current state of suggestions for |section|. |
120 virtual SuggestionState SuggestionStateForSection(DialogSection section) = 0; | 114 virtual SuggestionState SuggestionStateForSection(DialogSection section) = 0; |
121 | 115 |
122 // Should be called when the user starts editing of the section. | 116 // Should be called when the user starts editing of the section. |
123 virtual void EditClickedForSection(DialogSection section) = 0; | 117 virtual void EditClickedForSection(DialogSection section) = 0; |
124 | 118 |
125 // Should be called when the user cancels editing of the section. | 119 // Should be called when the user cancels editing of the section. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // The web contents that prompted the dialog. | 203 // The web contents that prompted the dialog. |
210 virtual content::WebContents* web_contents() = 0; | 204 virtual content::WebContents* web_contents() = 0; |
211 | 205 |
212 protected: | 206 protected: |
213 virtual ~AutofillDialogController(); | 207 virtual ~AutofillDialogController(); |
214 }; | 208 }; |
215 | 209 |
216 } // namespace autofill | 210 } // namespace autofill |
217 | 211 |
218 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 212 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
OLD | NEW |