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

Side by Side Diff: chrome/common/autofill_messages.h

Issue 11000016: Move forms/ out of webkit/. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years, 2 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
« no previous file with comments | « chrome/common/DEPS ('k') | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Multiply-included message file, hence no include guard. 5 // Multiply-included message file, hence no include guard.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/common/common_param_traits_macros.h" 10 #include "chrome/common/common_param_traits_macros.h"
11 #include "chrome/common/form_data.h"
12 #include "chrome/common/form_data_predictions.h"
13 #include "chrome/common/form_field_data.h"
14 #include "chrome/common/form_field_data_predictions.h"
15 #include "chrome/common/password_form_fill_data.h"
16 #include "content/public/common/password_form.h"
11 #include "ipc/ipc_message_macros.h" 17 #include "ipc/ipc_message_macros.h"
12 #include "ipc/ipc_message_utils.h" 18 #include "ipc/ipc_message_utils.h"
13 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
14 #include "webkit/forms/form_data.h"
15 #include "webkit/forms/form_data_predictions.h"
16 #include "webkit/forms/form_field.h"
17 #include "webkit/forms/form_field_predictions.h"
18 #include "webkit/forms/password_form.h"
19 #include "webkit/forms/password_form_dom_manager.h"
20 20
21 #define IPC_MESSAGE_START AutofillMsgStart 21 #define IPC_MESSAGE_START AutofillMsgStart
22 22
23 IPC_STRUCT_TRAITS_BEGIN(webkit::forms::FormField) 23 IPC_STRUCT_TRAITS_BEGIN(FormFieldData)
24 IPC_STRUCT_TRAITS_MEMBER(label) 24 IPC_STRUCT_TRAITS_MEMBER(label)
25 IPC_STRUCT_TRAITS_MEMBER(name) 25 IPC_STRUCT_TRAITS_MEMBER(name)
26 IPC_STRUCT_TRAITS_MEMBER(value) 26 IPC_STRUCT_TRAITS_MEMBER(value)
27 IPC_STRUCT_TRAITS_MEMBER(form_control_type) 27 IPC_STRUCT_TRAITS_MEMBER(form_control_type)
28 IPC_STRUCT_TRAITS_MEMBER(autocomplete_type) 28 IPC_STRUCT_TRAITS_MEMBER(autocomplete_type)
29 IPC_STRUCT_TRAITS_MEMBER(max_length) 29 IPC_STRUCT_TRAITS_MEMBER(max_length)
30 IPC_STRUCT_TRAITS_MEMBER(is_autofilled) 30 IPC_STRUCT_TRAITS_MEMBER(is_autofilled)
31 IPC_STRUCT_TRAITS_MEMBER(is_focusable) 31 IPC_STRUCT_TRAITS_MEMBER(is_focusable)
32 IPC_STRUCT_TRAITS_MEMBER(should_autocomplete) 32 IPC_STRUCT_TRAITS_MEMBER(should_autocomplete)
33 IPC_STRUCT_TRAITS_MEMBER(option_values) 33 IPC_STRUCT_TRAITS_MEMBER(option_values)
34 IPC_STRUCT_TRAITS_MEMBER(option_contents) 34 IPC_STRUCT_TRAITS_MEMBER(option_contents)
35 IPC_STRUCT_TRAITS_END() 35 IPC_STRUCT_TRAITS_END()
36 36
37 IPC_STRUCT_TRAITS_BEGIN(webkit::forms::FormFieldPredictions) 37 IPC_STRUCT_TRAITS_BEGIN(FormFieldDataPredictions)
38 IPC_STRUCT_TRAITS_MEMBER(field) 38 IPC_STRUCT_TRAITS_MEMBER(field)
39 IPC_STRUCT_TRAITS_MEMBER(signature) 39 IPC_STRUCT_TRAITS_MEMBER(signature)
40 IPC_STRUCT_TRAITS_MEMBER(heuristic_type) 40 IPC_STRUCT_TRAITS_MEMBER(heuristic_type)
41 IPC_STRUCT_TRAITS_MEMBER(server_type) 41 IPC_STRUCT_TRAITS_MEMBER(server_type)
42 IPC_STRUCT_TRAITS_MEMBER(overall_type) 42 IPC_STRUCT_TRAITS_MEMBER(overall_type)
43 IPC_STRUCT_TRAITS_END() 43 IPC_STRUCT_TRAITS_END()
44 44
45 IPC_STRUCT_TRAITS_BEGIN(webkit::forms::FormData) 45 IPC_STRUCT_TRAITS_BEGIN(FormData)
46 IPC_STRUCT_TRAITS_MEMBER(name) 46 IPC_STRUCT_TRAITS_MEMBER(name)
47 IPC_STRUCT_TRAITS_MEMBER(method) 47 IPC_STRUCT_TRAITS_MEMBER(method)
48 IPC_STRUCT_TRAITS_MEMBER(origin) 48 IPC_STRUCT_TRAITS_MEMBER(origin)
49 IPC_STRUCT_TRAITS_MEMBER(action) 49 IPC_STRUCT_TRAITS_MEMBER(action)
50 IPC_STRUCT_TRAITS_MEMBER(user_submitted) 50 IPC_STRUCT_TRAITS_MEMBER(user_submitted)
51 IPC_STRUCT_TRAITS_MEMBER(fields) 51 IPC_STRUCT_TRAITS_MEMBER(fields)
52 IPC_STRUCT_TRAITS_END() 52 IPC_STRUCT_TRAITS_END()
53 53
54 IPC_STRUCT_TRAITS_BEGIN(webkit::forms::FormDataPredictions) 54 IPC_STRUCT_TRAITS_BEGIN(FormDataPredictions)
55 IPC_STRUCT_TRAITS_MEMBER(data) 55 IPC_STRUCT_TRAITS_MEMBER(data)
56 IPC_STRUCT_TRAITS_MEMBER(signature) 56 IPC_STRUCT_TRAITS_MEMBER(signature)
57 IPC_STRUCT_TRAITS_MEMBER(experiment_id) 57 IPC_STRUCT_TRAITS_MEMBER(experiment_id)
58 IPC_STRUCT_TRAITS_MEMBER(fields) 58 IPC_STRUCT_TRAITS_MEMBER(fields)
59 IPC_STRUCT_TRAITS_END() 59 IPC_STRUCT_TRAITS_END()
60 60
61 IPC_STRUCT_TRAITS_BEGIN(webkit::forms::PasswordFormFillData) 61 IPC_STRUCT_TRAITS_BEGIN(PasswordFormFillData)
62 IPC_STRUCT_TRAITS_MEMBER(basic_data) 62 IPC_STRUCT_TRAITS_MEMBER(basic_data)
63 IPC_STRUCT_TRAITS_MEMBER(additional_logins) 63 IPC_STRUCT_TRAITS_MEMBER(additional_logins)
64 IPC_STRUCT_TRAITS_MEMBER(wait_for_username) 64 IPC_STRUCT_TRAITS_MEMBER(wait_for_username)
65 IPC_STRUCT_TRAITS_END() 65 IPC_STRUCT_TRAITS_END()
66 66
67 // Autofill messages sent from the browser to the renderer. 67 // Autofill messages sent from the browser to the renderer.
68 68
69 // Reply to the AutofillHostMsg_QueryFormFieldAutofill message with the 69 // Reply to the AutofillHostMsg_QueryFormFieldAutofill message with the
70 // Autofill suggestions. 70 // Autofill suggestions.
71 IPC_MESSAGE_ROUTED5(AutofillMsg_SuggestionsReturned, 71 IPC_MESSAGE_ROUTED5(AutofillMsg_SuggestionsReturned,
72 int /* id of the request message */, 72 int /* id of the request message */,
73 std::vector<string16> /* names */, 73 std::vector<string16> /* names */,
74 std::vector<string16> /* labels */, 74 std::vector<string16> /* labels */,
75 std::vector<string16> /* icons */, 75 std::vector<string16> /* icons */,
76 std::vector<int> /* unique_ids */) 76 std::vector<int> /* unique_ids */)
77 77
78 // Reply to the AutofillHostMsg_FillAutofillFormData message with the 78 // Reply to the AutofillHostMsg_FillAutofillFormData message with the
79 // Autofill form data. 79 // Autofill form data.
80 IPC_MESSAGE_ROUTED2(AutofillMsg_FormDataFilled, 80 IPC_MESSAGE_ROUTED2(AutofillMsg_FormDataFilled,
81 int /* id of the request message */, 81 int /* id of the request message */,
82 webkit::forms::FormData /* form data */) 82 FormData /* form data */)
83 83
84 // Fill a password form and prepare field autocomplete for multiple 84 // Fill a password form and prepare field autocomplete for multiple
85 // matching logins. Lets the renderer know if it should disable the popup 85 // matching logins. Lets the renderer know if it should disable the popup
86 // because the browser process will own the popup UI. 86 // because the browser process will own the popup UI.
87 IPC_MESSAGE_ROUTED2(AutofillMsg_FillPasswordForm, 87 IPC_MESSAGE_ROUTED2(AutofillMsg_FillPasswordForm,
88 webkit::forms::PasswordFormFillData, /* the fill form data*/ 88 PasswordFormFillData, /* the fill form data*/
89 bool /* disable popup */ ) 89 bool /* disable popup */ )
90 90
91 // Send the heuristic and server field type predictions to the renderer. 91 // Send the heuristic and server field type predictions to the renderer.
92 IPC_MESSAGE_ROUTED1( 92 IPC_MESSAGE_ROUTED1(
93 AutofillMsg_FieldTypePredictionsAvailable, 93 AutofillMsg_FieldTypePredictionsAvailable,
94 std::vector<webkit::forms::FormDataPredictions> /* forms */) 94 std::vector<FormDataPredictions> /* forms */)
95 95
96 // Select an Autofill item when using an external delegate. 96 // Select an Autofill item when using an external delegate.
97 IPC_MESSAGE_ROUTED1(AutofillMsg_SelectAutofillSuggestionAtIndex, 97 IPC_MESSAGE_ROUTED1(AutofillMsg_SelectAutofillSuggestionAtIndex,
98 int /* listIndex */) 98 int /* listIndex */)
99 99
100 // Tells the renderer that the next form will be filled for real. 100 // Tells the renderer that the next form will be filled for real.
101 IPC_MESSAGE_ROUTED0(AutofillMsg_SetAutofillActionFill) 101 IPC_MESSAGE_ROUTED0(AutofillMsg_SetAutofillActionFill)
102 102
103 // Clears the currently displayed Autofill results. 103 // Clears the currently displayed Autofill results.
104 IPC_MESSAGE_ROUTED0(AutofillMsg_ClearForm) 104 IPC_MESSAGE_ROUTED0(AutofillMsg_ClearForm)
(...skipping 21 matching lines...) Expand all
126 IPC_MESSAGE_ROUTED1(AutofillMsg_PasswordGenerationEnabled, 126 IPC_MESSAGE_ROUTED1(AutofillMsg_PasswordGenerationEnabled,
127 bool /* is_enabled */) 127 bool /* is_enabled */)
128 128
129 // Tells the renderer that the password field has accept the suggestion. 129 // Tells the renderer that the password field has accept the suggestion.
130 IPC_MESSAGE_ROUTED1(AutofillMsg_AcceptPasswordAutofillSuggestion, 130 IPC_MESSAGE_ROUTED1(AutofillMsg_AcceptPasswordAutofillSuggestion,
131 string16 /* username value*/) 131 string16 /* username value*/)
132 132
133 // Tells the renderer that this password form is not blacklisted. A form can 133 // Tells the renderer that this password form is not blacklisted. A form can
134 // be blacklisted if a user chooses "never save passwords for this site". 134 // be blacklisted if a user chooses "never save passwords for this site".
135 IPC_MESSAGE_ROUTED1(AutofillMsg_FormNotBlacklisted, 135 IPC_MESSAGE_ROUTED1(AutofillMsg_FormNotBlacklisted,
136 webkit::forms::PasswordForm /* form checked */) 136 content::PasswordForm /* form checked */)
137 137
138 // Autofill messages sent from the renderer to the browser. 138 // Autofill messages sent from the renderer to the browser.
139 139
140 // Notification that forms have been seen that are candidates for 140 // Notification that forms have been seen that are candidates for
141 // filling/submitting by the AutofillManager. 141 // filling/submitting by the AutofillManager.
142 IPC_MESSAGE_ROUTED2(AutofillHostMsg_FormsSeen, 142 IPC_MESSAGE_ROUTED2(AutofillHostMsg_FormsSeen,
143 std::vector<webkit::forms::FormData> /* forms */, 143 std::vector<FormData> /* forms */,
144 base::TimeTicks /* timestamp */) 144 base::TimeTicks /* timestamp */)
145 145
146 // Notification that password forms have been seen that are candidates for 146 // Notification that password forms have been seen that are candidates for
147 // filling/submitting by the password manager. 147 // filling/submitting by the password manager.
148 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsParsed, 148 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsParsed,
149 std::vector<webkit::forms::PasswordForm> /* forms */) 149 std::vector<content::PasswordForm> /* forms */)
150 150
151 // Notification that initial layout has occurred and the following password 151 // Notification that initial layout has occurred and the following password
152 // forms are visible on the page (e.g. not set to display:none.) 152 // forms are visible on the page (e.g. not set to display:none.)
153 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsRendered, 153 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsRendered,
154 std::vector<webkit::forms::PasswordForm> /* forms */) 154 std::vector<content::PasswordForm> /* forms */)
155 155
156 // Notification that a form has been submitted. The user hit the button. 156 // Notification that a form has been submitted. The user hit the button.
157 IPC_MESSAGE_ROUTED2(AutofillHostMsg_FormSubmitted, 157 IPC_MESSAGE_ROUTED2(AutofillHostMsg_FormSubmitted,
158 webkit::forms::FormData /* form */, 158 FormData /* form */,
159 base::TimeTicks /* timestamp */) 159 base::TimeTicks /* timestamp */)
160 160
161 // Notification that a form field's value has changed. 161 // Notification that a form field's value has changed.
162 IPC_MESSAGE_ROUTED3(AutofillHostMsg_TextFieldDidChange, 162 IPC_MESSAGE_ROUTED3(AutofillHostMsg_TextFieldDidChange,
163 webkit::forms::FormData /* the form */, 163 FormData /* the form */,
164 webkit::forms::FormField /* the form field */, 164 FormFieldData /* the form field */,
165 base::TimeTicks /* timestamp */) 165 base::TimeTicks /* timestamp */)
166 166
167 // Queries the browser for Autofill suggestions for a form input field. 167 // Queries the browser for Autofill suggestions for a form input field.
168 IPC_MESSAGE_ROUTED5(AutofillHostMsg_QueryFormFieldAutofill, 168 IPC_MESSAGE_ROUTED5(AutofillHostMsg_QueryFormFieldAutofill,
169 int /* id of this message */, 169 int /* id of this message */,
170 webkit::forms::FormData /* the form */, 170 FormData /* the form */,
171 webkit::forms::FormField /* the form field */, 171 FormFieldData /* the form field */,
172 gfx::Rect /* input field bounds, window-relative */, 172 gfx::Rect /* input field bounds, window-relative */,
173 bool /* display warning if autofill disabled */) 173 bool /* display warning if autofill disabled */)
174 174
175 // Sent when the popup with Autofill suggestions for a form is shown. 175 // Sent when the popup with Autofill suggestions for a form is shown.
176 IPC_MESSAGE_ROUTED1(AutofillHostMsg_DidShowAutofillSuggestions, 176 IPC_MESSAGE_ROUTED1(AutofillHostMsg_DidShowAutofillSuggestions,
177 bool /* is this a new popup? */) 177 bool /* is this a new popup? */)
178 178
179 // Instructs the browser to fill in the values for a form using Autofill 179 // Instructs the browser to fill in the values for a form using Autofill
180 // profile data. 180 // profile data.
181 IPC_MESSAGE_ROUTED4(AutofillHostMsg_FillAutofillFormData, 181 IPC_MESSAGE_ROUTED4(AutofillHostMsg_FillAutofillFormData,
182 int /* id of this message */, 182 int /* id of this message */,
183 webkit::forms::FormData /* the form */, 183 FormData /* the form */,
184 webkit::forms::FormField /* the form field */, 184 FormFieldData /* the form field */,
185 int /* profile unique ID */) 185 int /* profile unique ID */)
186 186
187 // Sent when a form is previewed with Autofill suggestions. 187 // Sent when a form is previewed with Autofill suggestions.
188 IPC_MESSAGE_ROUTED0(AutofillHostMsg_DidPreviewAutofillFormData) 188 IPC_MESSAGE_ROUTED0(AutofillHostMsg_DidPreviewAutofillFormData)
189 189
190 // Sent when a form is filled with Autofill suggestions. 190 // Sent when a form is filled with Autofill suggestions.
191 IPC_MESSAGE_ROUTED1(AutofillHostMsg_DidFillAutofillFormData, 191 IPC_MESSAGE_ROUTED1(AutofillHostMsg_DidFillAutofillFormData,
192 base::TimeTicks /* timestamp */) 192 base::TimeTicks /* timestamp */)
193 193
194 // Instructs the browser to remove the specified Autocomplete entry from the 194 // Instructs the browser to remove the specified Autocomplete entry from the
(...skipping 10 matching lines...) Expand all
205 205
206 // Instructs the browser to hide the Autofill popup. 206 // Instructs the browser to hide the Autofill popup.
207 IPC_MESSAGE_ROUTED0(AutofillHostMsg_HideAutofillPopup) 207 IPC_MESSAGE_ROUTED0(AutofillHostMsg_HideAutofillPopup)
208 208
209 // Instructs the browser to show the password generation bubble at the 209 // Instructs the browser to show the password generation bubble at the
210 // specified location. This location should be specified in the renderers 210 // specified location. This location should be specified in the renderers
211 // coordinate system. Form is the form associated with the password field. 211 // coordinate system. Form is the form associated with the password field.
212 IPC_MESSAGE_ROUTED3(AutofillHostMsg_ShowPasswordGenerationPopup, 212 IPC_MESSAGE_ROUTED3(AutofillHostMsg_ShowPasswordGenerationPopup,
213 gfx::Rect /* source location */, 213 gfx::Rect /* source location */,
214 int /* max length of the password */, 214 int /* max length of the password */,
215 webkit::forms::PasswordForm) 215 content::PasswordForm)
216 216
217 // Instruct the browser that a password mapping has been found for a field. 217 // Instruct the browser that a password mapping has been found for a field.
218 IPC_MESSAGE_ROUTED2(AutofillHostMsg_AddPasswordFormMapping, 218 IPC_MESSAGE_ROUTED2(AutofillHostMsg_AddPasswordFormMapping,
219 webkit::forms::FormField, /* the user name field */ 219 FormFieldData, /* the user name field */
220 webkit::forms::PasswordFormFillData /* password pairings */) 220 PasswordFormFillData /* password pairings */)
221 221
222 // Instruct the browser to show a popup with the following suggestions from the 222 // Instruct the browser to show a popup with the following suggestions from the
223 // password manager. 223 // password manager.
224 IPC_MESSAGE_ROUTED3(AutofillHostMsg_ShowPasswordSuggestions, 224 IPC_MESSAGE_ROUTED3(AutofillHostMsg_ShowPasswordSuggestions,
225 webkit::forms::FormField /* the form field */, 225 FormFieldData /* the form field */,
226 gfx::Rect /* input field bounds, window-relative */, 226 gfx::Rect /* input field bounds, window-relative */,
227 std::vector<string16> /* suggestions */) 227 std::vector<string16> /* suggestions */)
228 228
229 // Inform browser of data list values for the curent field. 229 // Inform browser of data list values for the curent field.
230 IPC_MESSAGE_ROUTED4(AutofillHostMsg_SetDataList, 230 IPC_MESSAGE_ROUTED4(AutofillHostMsg_SetDataList,
231 std::vector<string16> /* values */, 231 std::vector<string16> /* values */,
232 std::vector<string16> /* labels */, 232 std::vector<string16> /* labels */,
233 std::vector<string16> /* icons */, 233 std::vector<string16> /* icons */,
234 std::vector<int> /* unique ids */) 234 std::vector<int> /* unique ids */)
OLDNEW
« no previous file with comments | « chrome/common/DEPS ('k') | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698