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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 void RequestAutocompleteDialogClosed(); | 133 void RequestAutocompleteDialogClosed(); |
134 | 134 |
135 AutofillClient* client() const { return client_; } | 135 AutofillClient* client() const { return client_; } |
136 | 136 |
137 const std::string& app_locale() const { return app_locale_; } | 137 const std::string& app_locale() const { return app_locale_; } |
138 | 138 |
139 // Only for testing. | 139 // Only for testing. |
140 void SetTestDelegate(AutofillManagerTestDelegate* delegate); | 140 void SetTestDelegate(AutofillManagerTestDelegate* delegate); |
141 | 141 |
142 void OnFormsSeen(const std::vector<FormData>& forms, | 142 void OnFormsSeen(const std::vector<FormData>& forms, |
| 143 size_t unowned_form_index, |
143 const base::TimeTicks& timestamp); | 144 const base::TimeTicks& timestamp); |
144 | 145 |
145 // Processes the submitted |form|, saving any new Autofill data and uploading | 146 // Processes the submitted |form|, saving any new Autofill data and uploading |
146 // the possible field types for the submitted fields to the crowdsourcing | 147 // the possible field types for the submitted fields to the crowdsourcing |
147 // server. Returns false if this form is not relevant for Autofill. | 148 // server. Returns false if this form is not relevant for Autofill. |
148 bool OnFormSubmitted(const FormData& form, | 149 bool OnFormSubmitted(const FormData& form, |
149 const base::TimeTicks& timestamp); | 150 const base::TimeTicks& timestamp); |
150 | 151 |
151 void OnTextFieldDidChange(const FormData& form, | 152 void OnTextFieldDidChange(const FormData& form, |
152 const FormFieldData& field, | 153 const FormFieldData& field, |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 const FormFieldData& field, | 289 const FormFieldData& field, |
289 const AutofillField& autofill_field) const; | 290 const AutofillField& autofill_field) const; |
290 | 291 |
291 // Returns a list of values from the stored credit cards that match |type| and | 292 // Returns a list of values from the stored credit cards that match |type| and |
292 // the value of |field| and returns the labels of the matching credit cards. | 293 // the value of |field| and returns the labels of the matching credit cards. |
293 std::vector<Suggestion> GetCreditCardSuggestions( | 294 std::vector<Suggestion> GetCreditCardSuggestions( |
294 const FormFieldData& field, | 295 const FormFieldData& field, |
295 const AutofillType& type) const; | 296 const AutofillType& type) const; |
296 | 297 |
297 // Parses the forms using heuristic matching and querying the Autofill server. | 298 // Parses the forms using heuristic matching and querying the Autofill server. |
298 void ParseForms(const std::vector<FormData>& forms); | 299 void ParseForms(const std::vector<FormData>& forms, |
| 300 size_t unowned_form_index); |
299 | 301 |
300 // Imports the form data, submitted by the user, into |personal_data_|. | 302 // Imports the form data, submitted by the user, into |personal_data_|. |
301 void ImportFormData(const FormStructure& submitted_form); | 303 void ImportFormData(const FormStructure& submitted_form); |
302 | 304 |
303 // If |initial_interaction_timestamp_| is unset or is set to a later time than | 305 // If |initial_interaction_timestamp_| is unset or is set to a later time than |
304 // |interaction_timestamp|, updates the cached timestamp. The latter check is | 306 // |interaction_timestamp|, updates the cached timestamp. The latter check is |
305 // needed because IPC messages can arrive out of order. | 307 // needed because IPC messages can arrive out of order. |
306 void UpdateInitialInteractionTimestamp( | 308 void UpdateInitialInteractionTimestamp( |
307 const base::TimeTicks& interaction_timestamp); | 309 const base::TimeTicks& interaction_timestamp); |
308 | 310 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 409 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
408 AutocompleteOffRespected); | 410 AutocompleteOffRespected); |
409 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 411 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
410 AutocompleteOffRespectedWithFlag); | 412 AutocompleteOffRespectedWithFlag); |
411 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 413 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
412 }; | 414 }; |
413 | 415 |
414 } // namespace autofill | 416 } // namespace autofill |
415 | 417 |
416 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 418 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |