OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_VIEW_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // error message. | 147 // error message. |
148 virtual base::string16 InputValidityMessage(DialogSection section, | 148 virtual base::string16 InputValidityMessage(DialogSection section, |
149 ServerFieldType type, | 149 ServerFieldType type, |
150 const base::string16& value) = 0; | 150 const base::string16& value) = 0; |
151 | 151 |
152 // Decides whether the combination of all |inputs| is valid, returns a | 152 // Decides whether the combination of all |inputs| is valid, returns a |
153 // map of field types to validity messages. | 153 // map of field types to validity messages. |
154 virtual ValidityMessages InputsAreValid(DialogSection section, | 154 virtual ValidityMessages InputsAreValid(DialogSection section, |
155 const FieldValueMap& inputs) = 0; | 155 const FieldValueMap& inputs) = 0; |
156 | 156 |
157 // Called when the user changes the contents of a text field or activates it | 157 // Called when the user edits or activates a textfield or combobox. |
158 // (by focusing and then clicking it). |was_edit| is true when the function | 158 // |was_edit| is true when the function was called in response to the user |
159 // was called in response to the user editing the text field. | 159 // editing the input. |
160 virtual void UserEditedOrActivatedInput(DialogSection section, | 160 virtual void UserEditedOrActivatedInput(DialogSection section, |
161 ServerFieldType type, | 161 ServerFieldType type, |
162 gfx::NativeView parent_view, | 162 gfx::NativeView parent_view, |
163 const gfx::Rect& content_bounds, | 163 const gfx::Rect& content_bounds, |
164 const base::string16& field_contents, | 164 const base::string16& field_contents, |
165 bool was_edit) = 0; | 165 bool was_edit) = 0; |
166 | 166 |
167 // The view forwards keypresses in text inputs. Returns true if there should | 167 // The view forwards keypresses in text inputs. Returns true if there should |
168 // be no further processing of the event. | 168 // be no further processing of the event. |
169 virtual bool HandleKeyPressEventInInput( | 169 virtual bool HandleKeyPressEventInInput( |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 // The web contents that prompted the dialog. | 213 // The web contents that prompted the dialog. |
214 virtual content::WebContents* GetWebContents() = 0; | 214 virtual content::WebContents* GetWebContents() = 0; |
215 | 215 |
216 protected: | 216 protected: |
217 virtual ~AutofillDialogViewDelegate(); | 217 virtual ~AutofillDialogViewDelegate(); |
218 }; | 218 }; |
219 | 219 |
220 } // namespace autofill | 220 } // namespace autofill |
221 | 221 |
222 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ | 222 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ |
OLD | NEW |