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

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: tests Created 7 years 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 virtual bool InputIsEditable(const DetailInput& input, 139 virtual bool InputIsEditable(const DetailInput& input,
140 DialogSection section) = 0; 140 DialogSection section) = 0;
141 141
142 // Decides whether input of |value| is valid for a field of type |type|. If 142 // Decides whether input of |value| is valid for a field of type |type|. If
143 // valid, the returned string will be empty. Otherwise it will contain an 143 // valid, the returned string will be empty. Otherwise it will contain an
144 // error message. 144 // error message.
145 virtual string16 InputValidityMessage(DialogSection section, 145 virtual string16 InputValidityMessage(DialogSection section,
146 ServerFieldType type, 146 ServerFieldType type,
147 const string16& value) = 0; 147 const string16& value) = 0;
148 148
149
150 // Decides whether the combination of all |inputs| is valid, returns a 149 // Decides whether the combination of all |inputs| is valid, returns a
151 // map of field types to validity messages. 150 // map of field types to validity messages.
152 virtual ValidityMessages InputsAreValid(DialogSection section, 151 virtual ValidityMessages InputsAreValid(DialogSection section,
153 const FieldValueMap& inputs) = 0; 152 const FieldValueMap& inputs) = 0;
154 153
155 // Called when the user changes the contents of a text field or activates it 154 // Called when the user changes the contents of a text field or activates it
156 // (by focusing and then clicking it). |was_edit| is true when the function 155 // (by focusing and then clicking it). |was_edit| is true when the function
157 // was called in response to the user editing the text field. 156 // was called in response to the user editing the text field.
158 virtual void UserEditedOrActivatedInput(DialogSection section, 157 virtual void UserEditedOrActivatedInput(DialogSection section,
159 ServerFieldType type, 158 ServerFieldType type,
160 gfx::NativeView parent_view, 159 gfx::NativeView parent_view,
161 const gfx::Rect& content_bounds, 160 const gfx::Rect& content_bounds,
162 const string16& field_contents, 161 const string16& field_contents,
163 bool was_edit) = 0; 162 bool was_edit) = 0;
164 163
165 // The view forwards keypresses in text inputs. Returns true if there should 164 // The view forwards keypresses in text inputs. Returns true if there should
166 // be no further processing of the event. 165 // be no further processing of the event.
167 virtual bool HandleKeyPressEventInInput( 166 virtual bool HandleKeyPressEventInInput(
168 const content::NativeWebKeyboardEvent& event) = 0; 167 const content::NativeWebKeyboardEvent& event) = 0;
169 168
169 // Called when a user selects an item in a combobox.
170 virtual void ComboboxItemSelected(ServerFieldType type, int index) = 0;
171
170 // Called when focus has changed position within the view. 172 // Called when focus has changed position within the view.
171 virtual void FocusMoved() = 0; 173 virtual void FocusMoved() = 0;
172 174
173 // Whether the view should show a validation error bubble. 175 // Whether the view should show a validation error bubble.
174 virtual bool ShouldShowErrorBubble() const = 0; 176 virtual bool ShouldShowErrorBubble() const = 0;
175 177
176 // Miscellany ---------------------------------------------------------------- 178 // Miscellany ----------------------------------------------------------------
177 179
178 // Called when the view has been closed. 180 // Called when the view has been closed.
179 virtual void ViewClosed() = 0; 181 virtual void ViewClosed() = 0;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // The web contents that prompted the dialog. 213 // The web contents that prompted the dialog.
212 virtual content::WebContents* GetWebContents() = 0; 214 virtual content::WebContents* GetWebContents() = 0;
213 215
214 protected: 216 protected:
215 virtual ~AutofillDialogViewDelegate(); 217 virtual ~AutofillDialogViewDelegate();
216 }; 218 };
217 219
218 } // namespace autofill 220 } // namespace autofill
219 221
220 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ 222 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698