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

Side by Side Diff: components/autofill/content/common/autofill_messages.h

Issue 1153023004: Prepare the infrastructure for password overrides. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the test. Created 5 years, 6 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
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 // 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 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "components/autofill/content/common/autofill_param_traits_macros.h" 12 #include "components/autofill/content/common/autofill_param_traits_macros.h"
13 #include "components/autofill/core/common/form_data.h" 13 #include "components/autofill/core/common/form_data.h"
14 #include "components/autofill/core/common/form_data_predictions.h" 14 #include "components/autofill/core/common/form_data_predictions.h"
15 #include "components/autofill/core/common/form_field_data.h" 15 #include "components/autofill/core/common/form_field_data.h"
16 #include "components/autofill/core/common/form_field_data_predictions.h" 16 #include "components/autofill/core/common/form_field_data_predictions.h"
17 #include "components/autofill/core/common/password_form.h" 17 #include "components/autofill/core/common/password_form.h"
18 #include "components/autofill/core/common/password_form_field_prediction_map.h"
18 #include "components/autofill/core/common/password_form_fill_data.h" 19 #include "components/autofill/core/common/password_form_fill_data.h"
19 #include "components/autofill/core/common/web_element_descriptor.h" 20 #include "components/autofill/core/common/web_element_descriptor.h"
20 #include "content/public/common/common_param_traits.h" 21 #include "content/public/common/common_param_traits.h"
21 #include "content/public/common/common_param_traits_macros.h" 22 #include "content/public/common/common_param_traits_macros.h"
22 #include "ipc/ipc_message_macros.h" 23 #include "ipc/ipc_message_macros.h"
23 #include "ipc/ipc_message_utils.h" 24 #include "ipc/ipc_message_utils.h"
24 #include "third_party/WebKit/public/web/WebFormElement.h" 25 #include "third_party/WebKit/public/web/WebFormElement.h"
25 #include "ui/gfx/geometry/rect.h" 26 #include "ui/gfx/geometry/rect.h"
26 #include "ui/gfx/ipc/gfx_param_traits.h" 27 #include "ui/gfx/ipc/gfx_param_traits.h"
27 #include "url/gurl.h" 28 #include "url/gurl.h"
28 29
29 #define IPC_MESSAGE_START AutofillMsgStart 30 #define IPC_MESSAGE_START AutofillMsgStart
30 31
31 IPC_ENUM_TRAITS_MAX_VALUE(autofill::FormFieldData::RoleAttribute, 32 IPC_ENUM_TRAITS_MAX_VALUE(autofill::FormFieldData::RoleAttribute,
32 autofill::FormFieldData::ROLE_ATTRIBUTE_OTHER) 33 autofill::FormFieldData::ROLE_ATTRIBUTE_OTHER)
33 34
35 IPC_ENUM_TRAITS_MAX_VALUE(
36 autofill::PasswordFormFieldPredictionType,
37 autofill::PasswordFormFieldPredictionType::PREDICTION_MAX)
38
34 IPC_ENUM_TRAITS_MAX_VALUE(base::i18n::TextDirection, 39 IPC_ENUM_TRAITS_MAX_VALUE(base::i18n::TextDirection,
35 base::i18n::TEXT_DIRECTION_NUM_DIRECTIONS - 1) 40 base::i18n::TEXT_DIRECTION_NUM_DIRECTIONS - 1)
36 41
37 IPC_STRUCT_TRAITS_BEGIN(autofill::WebElementDescriptor) 42 IPC_STRUCT_TRAITS_BEGIN(autofill::WebElementDescriptor)
38 IPC_STRUCT_TRAITS_MEMBER(descriptor) 43 IPC_STRUCT_TRAITS_MEMBER(descriptor)
39 IPC_STRUCT_TRAITS_MEMBER(retrieval_method) 44 IPC_STRUCT_TRAITS_MEMBER(retrieval_method)
40 IPC_STRUCT_TRAITS_END() 45 IPC_STRUCT_TRAITS_END()
41 46
42 IPC_ENUM_TRAITS_MAX_VALUE(autofill::WebElementDescriptor::RetrievalMethod, 47 IPC_ENUM_TRAITS_MAX_VALUE(autofill::WebElementDescriptor::RetrievalMethod,
43 autofill::WebElementDescriptor::NONE) 48 autofill::WebElementDescriptor::NONE)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 IPC_ENUM_TRAITS_MAX_VALUE( 106 IPC_ENUM_TRAITS_MAX_VALUE(
102 blink::WebFormElement::AutocompleteResult, 107 blink::WebFormElement::AutocompleteResult,
103 blink::WebFormElement::AutocompleteResultErrorInvalid) 108 blink::WebFormElement::AutocompleteResultErrorInvalid)
104 109
105 // Singly-included section for type definitions. 110 // Singly-included section for type definitions.
106 #ifndef COMPONENTS_AUTOFILL_CONTENT_COMMON_AUTOFILL_MESSAGES_H_ 111 #ifndef COMPONENTS_AUTOFILL_CONTENT_COMMON_AUTOFILL_MESSAGES_H_
107 #define COMPONENTS_AUTOFILL_CONTENT_COMMON_AUTOFILL_MESSAGES_H_ 112 #define COMPONENTS_AUTOFILL_CONTENT_COMMON_AUTOFILL_MESSAGES_H_
108 113
109 // IPC_MESSAGE macros fail on the std::map, when expanding. We need to define 114 // IPC_MESSAGE macros fail on the std::map, when expanding. We need to define
110 // a type to avoid that. 115 // a type to avoid that.
111 using FormDataFieldDataMap = 116 using FormsPredictionsMap =
112 std::map<autofill::FormData, autofill::FormFieldData>; 117 std::map<autofill::FormData, autofill::PasswordFormFieldPredictionMap>;
113 118
114 #endif // COMPONENTS_AUTOFILL_CONTENT_COMMON_AUTOFILL_MESSAGES_H_ 119 #endif // COMPONENTS_AUTOFILL_CONTENT_COMMON_AUTOFILL_MESSAGES_H_
115 120
116 // Autofill messages sent from the browser to the renderer. 121 // Autofill messages sent from the browser to the renderer.
117 122
118 // Tells the render frame that a user gesture was observed somewhere in the tab 123 // Tells the render frame that a user gesture was observed somewhere in the tab
119 // (including in a different frame). 124 // (including in a different frame).
120 IPC_MESSAGE_ROUTED0(AutofillMsg_FirstUserGestureObservedInTab) 125 IPC_MESSAGE_ROUTED0(AutofillMsg_FirstUserGestureObservedInTab)
121 126
122 // Instructs the renderer to immediately return an IPC acknowledging the ping. 127 // Instructs the renderer to immediately return an IPC acknowledging the ping.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 blink::WebFormElement::AutocompleteResult /* result */, 205 blink::WebFormElement::AutocompleteResult /* result */,
201 base::string16 /* message */, 206 base::string16 /* message */,
202 autofill::FormData /* form_data */) 207 autofill::FormData /* form_data */)
203 208
204 // Sent when Autofill manager gets the query response from the Autofill server 209 // Sent when Autofill manager gets the query response from the Autofill server
205 // and there are fields classified as ACCOUNT_CREATION_PASSWORD in the response. 210 // and there are fields classified as ACCOUNT_CREATION_PASSWORD in the response.
206 IPC_MESSAGE_ROUTED1(AutofillMsg_AccountCreationFormsDetected, 211 IPC_MESSAGE_ROUTED1(AutofillMsg_AccountCreationFormsDetected,
207 std::vector<autofill::FormData> /* forms */) 212 std::vector<autofill::FormData> /* forms */)
208 213
209 // Sent when Autofill manager gets the query response from the Autofill server 214 // Sent when Autofill manager gets the query response from the Autofill server
210 // which contains information about username fields for some forms. 215 // which contains information about username and password fields for some forms.
211 // |predictions| maps forms to their username fields. 216 // |predictions| maps forms to their username fields.
212 IPC_MESSAGE_ROUTED1(AutofillMsg_AutofillUsernameDataReceived, 217 IPC_MESSAGE_ROUTED1(AutofillMsg_AutofillUsernameAndPasswordDataReceived,
213 FormDataFieldDataMap /* predictions */) 218 FormsPredictionsMap /* predictions */)
214 219
215 // Autofill messages sent from the renderer to the browser. 220 // Autofill messages sent from the renderer to the browser.
216 221
217 // TODO(creis): check in the browser that the renderer actually has permission 222 // TODO(creis): check in the browser that the renderer actually has permission
218 // for the URL to avoid compromised renderers talking to the browser. 223 // for the URL to avoid compromised renderers talking to the browser.
219 224
220 // Notification that there has been a user gesture. 225 // Notification that there has been a user gesture.
221 IPC_MESSAGE_ROUTED0(AutofillHostMsg_FirstUserGestureObserved) 226 IPC_MESSAGE_ROUTED0(AutofillHostMsg_FirstUserGestureObserved)
222 227
223 // Notification that forms have been seen that are candidates for 228 // Notification that forms have been seen that are candidates for
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 int /* key */, 336 int /* key */,
332 base::i18n::TextDirection /* text_direction */, 337 base::i18n::TextDirection /* text_direction */,
333 base::string16 /* username typed by user */, 338 base::string16 /* username typed by user */,
334 int /* options bitmask of autofill::ShowPasswordSuggestionsOptions */, 339 int /* options bitmask of autofill::ShowPasswordSuggestionsOptions */,
335 gfx::RectF /* input field bounds, window-relative */) 340 gfx::RectF /* input field bounds, window-relative */)
336 341
337 // Inform browser of data list values for the curent field. 342 // Inform browser of data list values for the curent field.
338 IPC_MESSAGE_ROUTED2(AutofillHostMsg_SetDataList, 343 IPC_MESSAGE_ROUTED2(AutofillHostMsg_SetDataList,
339 std::vector<base::string16> /* values */, 344 std::vector<base::string16> /* values */,
340 std::vector<base::string16> /* labels */) 345 std::vector<base::string16> /* labels */)
OLDNEW
« no previous file with comments | « components/autofill.gypi ('k') | components/autofill/content/renderer/password_autofill_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698