Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_view_delegate.h

Issue 63053003: Ask libaddressinput for address components to use in requestAutocomplete(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base:: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 virtual bool InputIsEditable(const DetailInput& input, 142 virtual bool InputIsEditable(const DetailInput& input,
143 DialogSection section) = 0; 143 DialogSection section) = 0;
144 144
145 // Decides whether input of |value| is valid for a field of type |type|. If 145 // Decides whether input of |value| is valid for a field of type |type|. If
146 // valid, the returned string will be empty. Otherwise it will contain an 146 // valid, the returned string will be empty. Otherwise it will contain an
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
153 // Decides whether the combination of all |inputs| is valid, returns a 152 // Decides whether the combination of all |inputs| is valid, returns a
154 // map of field types to validity messages. 153 // map of field types to validity messages.
155 virtual ValidityMessages InputsAreValid(DialogSection section, 154 virtual ValidityMessages InputsAreValid(DialogSection section,
156 const FieldValueMap& inputs) = 0; 155 const FieldValueMap& inputs) = 0;
157 156
158 // Called when the user changes the contents of a text field or activates it 157 // Called when the user changes the contents of a text field or activates it
159 // (by focusing and then clicking it). |was_edit| is true when the function 158 // (by focusing and then clicking it). |was_edit| is true when the function
160 // was called in response to the user editing the text field. 159 // was called in response to the user editing the text field.
161 virtual void UserEditedOrActivatedInput(DialogSection section, 160 virtual void UserEditedOrActivatedInput(DialogSection section,
162 ServerFieldType type, 161 ServerFieldType type,
163 gfx::NativeView parent_view, 162 gfx::NativeView parent_view,
164 const gfx::Rect& content_bounds, 163 const gfx::Rect& content_bounds,
165 const base::string16& field_contents, 164 const base::string16& field_contents,
166 bool was_edit) = 0; 165 bool was_edit) = 0;
167 166
168 // 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
169 // be no further processing of the event. 168 // be no further processing of the event.
170 virtual bool HandleKeyPressEventInInput( 169 virtual bool HandleKeyPressEventInInput(
171 const content::NativeWebKeyboardEvent& event) = 0; 170 const content::NativeWebKeyboardEvent& event) = 0;
172 171
172 // Called when a user selects an item in a combobox.
173 virtual void ComboboxItemSelected(ServerFieldType type, int index) = 0;
174
173 // Called when focus has changed position within the view. 175 // Called when focus has changed position within the view.
174 virtual void FocusMoved() = 0; 176 virtual void FocusMoved() = 0;
175 177
176 // Whether the view should show a validation error bubble. 178 // Whether the view should show a validation error bubble.
177 virtual bool ShouldShowErrorBubble() const = 0; 179 virtual bool ShouldShowErrorBubble() const = 0;
178 180
179 // Miscellany ---------------------------------------------------------------- 181 // Miscellany ----------------------------------------------------------------
180 182
181 // Called when the view has been closed. 183 // Called when the view has been closed.
182 virtual void ViewClosed() = 0; 184 virtual void ViewClosed() = 0;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // The web contents that prompted the dialog. 216 // The web contents that prompted the dialog.
215 virtual content::WebContents* GetWebContents() = 0; 217 virtual content::WebContents* GetWebContents() = 0;
216 218
217 protected: 219 protected:
218 virtual ~AutofillDialogViewDelegate(); 220 virtual ~AutofillDialogViewDelegate();
219 }; 221 };
220 222
221 } // namespace autofill 223 } // namespace autofill
222 224
223 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ 225 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698