| 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 // 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/time.h" | 9 #include "base/time/time.h" |
| 10 #include "components/autofill/core/common/autofill_param_traits_macros.h" |
| 10 #include "components/autofill/core/common/form_data.h" | 11 #include "components/autofill/core/common/form_data.h" |
| 11 #include "components/autofill/core/common/form_data_predictions.h" | 12 #include "components/autofill/core/common/form_data_predictions.h" |
| 12 #include "components/autofill/core/common/form_field_data.h" | 13 #include "components/autofill/core/common/form_field_data.h" |
| 13 #include "components/autofill/core/common/form_field_data_predictions.h" | 14 #include "components/autofill/core/common/form_field_data_predictions.h" |
| 14 #include "components/autofill/core/common/forms_seen_state.h" | 15 #include "components/autofill/core/common/forms_seen_state.h" |
| 16 #include "components/autofill/core/common/password_form.h" |
| 15 #include "components/autofill/core/common/password_form_fill_data.h" | 17 #include "components/autofill/core/common/password_form_fill_data.h" |
| 16 #include "components/autofill/core/common/web_element_descriptor.h" | 18 #include "components/autofill/core/common/web_element_descriptor.h" |
| 17 #include "content/public/common/common_param_traits.h" | 19 #include "content/public/common/common_param_traits.h" |
| 18 #include "content/public/common/common_param_traits_macros.h" | 20 #include "content/public/common/common_param_traits_macros.h" |
| 19 #include "content/public/common/password_form.h" | |
| 20 #include "ipc/ipc_message_macros.h" | 21 #include "ipc/ipc_message_macros.h" |
| 21 #include "ipc/ipc_message_utils.h" | 22 #include "ipc/ipc_message_utils.h" |
| 22 #include "third_party/WebKit/public/web/WebFormElement.h" | 23 #include "third_party/WebKit/public/web/WebFormElement.h" |
| 23 #include "ui/gfx/rect.h" | 24 #include "ui/gfx/rect.h" |
| 24 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 25 | 26 |
| 26 #define IPC_MESSAGE_START AutofillMsgStart | 27 #define IPC_MESSAGE_START AutofillMsgStart |
| 27 | 28 |
| 28 IPC_ENUM_TRAITS_MAX_VALUE(autofill::FormsSeenState, | 29 IPC_ENUM_TRAITS_MAX_VALUE(autofill::FormsSeenState, |
| 29 autofill::FORMS_SEEN_STATE_NUM_STATES - 1) | 30 autofill::FORMS_SEEN_STATE_NUM_STATES - 1) |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 IPC_MESSAGE_ROUTED1(AutofillMsg_PasswordGenerationEnabled, | 150 IPC_MESSAGE_ROUTED1(AutofillMsg_PasswordGenerationEnabled, |
| 150 bool /* is_enabled */) | 151 bool /* is_enabled */) |
| 151 | 152 |
| 152 // Tells the renderer that the password field has accept the suggestion. | 153 // Tells the renderer that the password field has accept the suggestion. |
| 153 IPC_MESSAGE_ROUTED1(AutofillMsg_AcceptPasswordAutofillSuggestion, | 154 IPC_MESSAGE_ROUTED1(AutofillMsg_AcceptPasswordAutofillSuggestion, |
| 154 base::string16 /* username value*/) | 155 base::string16 /* username value*/) |
| 155 | 156 |
| 156 // Tells the renderer that this password form is not blacklisted. A form can | 157 // Tells the renderer that this password form is not blacklisted. A form can |
| 157 // be blacklisted if a user chooses "never save passwords for this site". | 158 // be blacklisted if a user chooses "never save passwords for this site". |
| 158 IPC_MESSAGE_ROUTED1(AutofillMsg_FormNotBlacklisted, | 159 IPC_MESSAGE_ROUTED1(AutofillMsg_FormNotBlacklisted, |
| 159 content::PasswordForm /* form checked */) | 160 autofill::PasswordForm /* form checked */) |
| 160 | 161 |
| 161 // Sent when requestAutocomplete() finishes (either succesfully or with an | 162 // Sent when requestAutocomplete() finishes (either succesfully or with an |
| 162 // error). If it was a success, the renderer fills the form that requested | 163 // error). If it was a success, the renderer fills the form that requested |
| 163 // autocomplete with the |form_data| values input by the user. | 164 // autocomplete with the |form_data| values input by the user. |
| 164 IPC_MESSAGE_ROUTED2(AutofillMsg_RequestAutocompleteResult, | 165 IPC_MESSAGE_ROUTED2(AutofillMsg_RequestAutocompleteResult, |
| 165 WebKit::WebFormElement::AutocompleteResult /* result */, | 166 WebKit::WebFormElement::AutocompleteResult /* result */, |
| 166 autofill::FormData /* form_data */) | 167 autofill::FormData /* form_data */) |
| 167 | 168 |
| 168 // Sent when the current page is actually displayed in the browser, possibly | 169 // Sent when the current page is actually displayed in the browser, possibly |
| 169 // after being preloaded. | 170 // after being preloaded. |
| 170 IPC_MESSAGE_ROUTED0(AutofillMsg_PageShown) | 171 IPC_MESSAGE_ROUTED0(AutofillMsg_PageShown) |
| 171 | 172 |
| 172 // Autofill messages sent from the renderer to the browser. | 173 // Autofill messages sent from the renderer to the browser. |
| 173 | 174 |
| 174 // TODO(creis): check in the browser that the renderer actually has permission | 175 // TODO(creis): check in the browser that the renderer actually has permission |
| 175 // for the URL to avoid compromised renderers talking to the browser. | 176 // for the URL to avoid compromised renderers talking to the browser. |
| 176 | 177 |
| 177 // Notification that forms have been seen that are candidates for | 178 // Notification that forms have been seen that are candidates for |
| 178 // filling/submitting by the AutofillManager. | 179 // filling/submitting by the AutofillManager. |
| 179 IPC_MESSAGE_ROUTED3(AutofillHostMsg_FormsSeen, | 180 IPC_MESSAGE_ROUTED3(AutofillHostMsg_FormsSeen, |
| 180 std::vector<autofill::FormData> /* forms */, | 181 std::vector<autofill::FormData> /* forms */, |
| 181 base::TimeTicks /* timestamp */, | 182 base::TimeTicks /* timestamp */, |
| 182 autofill::FormsSeenState /* state */) | 183 autofill::FormsSeenState /* state */) |
| 183 | 184 |
| 184 // Notification that password forms have been seen that are candidates for | 185 // Notification that password forms have been seen that are candidates for |
| 185 // filling/submitting by the password manager. | 186 // filling/submitting by the password manager. |
| 186 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsParsed, | 187 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsParsed, |
| 187 std::vector<content::PasswordForm> /* forms */) | 188 std::vector<autofill::PasswordForm> /* forms */) |
| 188 | 189 |
| 189 // Notification that initial layout has occurred and the following password | 190 // Notification that initial layout has occurred and the following password |
| 190 // forms are visible on the page (e.g. not set to display:none.) | 191 // forms are visible on the page (e.g. not set to display:none.) |
| 191 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsRendered, | 192 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsRendered, |
| 192 std::vector<content::PasswordForm> /* forms */) | 193 std::vector<autofill::PasswordForm> /* forms */) |
| 193 | 194 |
| 194 // Notification that this password form was submitted by the user. | 195 // Notification that this password form was submitted by the user. |
| 195 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormSubmitted, | 196 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormSubmitted, |
| 196 content::PasswordForm /* form */) | 197 autofill::PasswordForm /* form */) |
| 197 | 198 |
| 198 // Notification that a form has been submitted. The user hit the button. | 199 // Notification that a form has been submitted. The user hit the button. |
| 199 IPC_MESSAGE_ROUTED2(AutofillHostMsg_FormSubmitted, | 200 IPC_MESSAGE_ROUTED2(AutofillHostMsg_FormSubmitted, |
| 200 autofill::FormData /* form */, | 201 autofill::FormData /* form */, |
| 201 base::TimeTicks /* timestamp */) | 202 base::TimeTicks /* timestamp */) |
| 202 | 203 |
| 203 // Notification that a form field's value has changed. | 204 // Notification that a form field's value has changed. |
| 204 IPC_MESSAGE_ROUTED3(AutofillHostMsg_TextFieldDidChange, | 205 IPC_MESSAGE_ROUTED3(AutofillHostMsg_TextFieldDidChange, |
| 205 autofill::FormData /* the form */, | 206 autofill::FormData /* the form */, |
| 206 autofill::FormFieldData /* the form field */, | 207 autofill::FormFieldData /* the form field */, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 243 |
| 243 // Instructs the browser to hide the Autofill UI. | 244 // Instructs the browser to hide the Autofill UI. |
| 244 IPC_MESSAGE_ROUTED0(AutofillHostMsg_HideAutofillUI) | 245 IPC_MESSAGE_ROUTED0(AutofillHostMsg_HideAutofillUI) |
| 245 | 246 |
| 246 // Instructs the browser to show the password generation bubble at the | 247 // Instructs the browser to show the password generation bubble at the |
| 247 // specified location. This location should be specified in the renderers | 248 // specified location. This location should be specified in the renderers |
| 248 // coordinate system. Form is the form associated with the password field. | 249 // coordinate system. Form is the form associated with the password field. |
| 249 IPC_MESSAGE_ROUTED3(AutofillHostMsg_ShowPasswordGenerationPopup, | 250 IPC_MESSAGE_ROUTED3(AutofillHostMsg_ShowPasswordGenerationPopup, |
| 250 gfx::Rect /* source location */, | 251 gfx::Rect /* source location */, |
| 251 int /* max length of the password */, | 252 int /* max length of the password */, |
| 252 content::PasswordForm) | 253 autofill::PasswordForm) |
| 253 | 254 |
| 254 // Instruct the browser that a password mapping has been found for a field. | 255 // Instruct the browser that a password mapping has been found for a field. |
| 255 IPC_MESSAGE_ROUTED2(AutofillHostMsg_AddPasswordFormMapping, | 256 IPC_MESSAGE_ROUTED2(AutofillHostMsg_AddPasswordFormMapping, |
| 256 autofill::FormFieldData, /* the user name field */ | 257 autofill::FormFieldData, /* the user name field */ |
| 257 autofill::PasswordFormFillData /* password pairings */) | 258 autofill::PasswordFormFillData /* password pairings */) |
| 258 | 259 |
| 259 // Instruct the browser to show a popup with the following suggestions from the | 260 // Instruct the browser to show a popup with the following suggestions from the |
| 260 // password manager. | 261 // password manager. |
| 261 IPC_MESSAGE_ROUTED4(AutofillHostMsg_ShowPasswordSuggestions, | 262 IPC_MESSAGE_ROUTED4(AutofillHostMsg_ShowPasswordSuggestions, |
| 262 autofill::FormFieldData /* the form field */, | 263 autofill::FormFieldData /* the form field */, |
| 263 gfx::RectF /* input field bounds, window-relative */, | 264 gfx::RectF /* input field bounds, window-relative */, |
| 264 std::vector<base::string16> /* suggestions */, | 265 std::vector<base::string16> /* suggestions */, |
| 265 std::vector<base::string16> /* realms */) | 266 std::vector<base::string16> /* realms */) |
| 266 | 267 |
| 267 // Inform browser of data list values for the curent field. | 268 // Inform browser of data list values for the curent field. |
| 268 IPC_MESSAGE_ROUTED2(AutofillHostMsg_SetDataList, | 269 IPC_MESSAGE_ROUTED2(AutofillHostMsg_SetDataList, |
| 269 std::vector<base::string16> /* values */, | 270 std::vector<base::string16> /* values */, |
| 270 std::vector<base::string16> /* labels */) | 271 std::vector<base::string16> /* labels */) |
| OLD | NEW |