OLD | NEW |
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 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ |
6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 class Rect; | 51 class Rect; |
52 class RectF; | 52 class RectF; |
53 } | 53 } |
54 | 54 |
55 namespace IPC { | 55 namespace IPC { |
56 class Message; | 56 class Message; |
57 } | 57 } |
58 | 58 |
59 namespace autofill { | 59 namespace autofill { |
60 | 60 |
| 61 class AutofillDataModel; |
61 class AutofillExternalDelegate; | 62 class AutofillExternalDelegate; |
62 class AutofillField; | 63 class AutofillField; |
63 class AutofillProfile; | 64 class AutofillProfile; |
64 class AutofillManagerDelegate; | 65 class AutofillManagerDelegate; |
65 class AutofillManagerTestDelegate; | 66 class AutofillManagerTestDelegate; |
66 class AutofillMetrics; | 67 class AutofillMetrics; |
67 class CreditCard; | 68 class CreditCard; |
68 class FormStructureBrowserTest; | 69 class FormStructureBrowserTest; |
69 class FormGroup; | |
70 class PasswordGenerator; | 70 class PasswordGenerator; |
71 | 71 |
72 struct FormData; | 72 struct FormData; |
73 struct FormFieldData; | 73 struct FormFieldData; |
74 struct PasswordFormFillData; | 74 struct PasswordFormFillData; |
75 | 75 |
76 // Manages saving and restoring the user's personal information entered into web | 76 // Manages saving and restoring the user's personal information entered into web |
77 // forms. | 77 // forms. |
78 class AutofillManager : public content::WebContentsObserver, | 78 class AutofillManager : public content::WebContentsObserver, |
79 public AutofillDownloadManager::Observer, | 79 public AutofillDownloadManager::Observer, |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 virtual std::string GetAutocheckoutURLPrefix() const; | 295 virtual std::string GetAutocheckoutURLPrefix() const; |
296 | 296 |
297 // Fills |host| with the RenderViewHost for this tab. | 297 // Fills |host| with the RenderViewHost for this tab. |
298 // Returns false if Autofill is disabled or if the host is unavailable. | 298 // Returns false if Autofill is disabled or if the host is unavailable. |
299 bool GetHost(content::RenderViewHost** host) const WARN_UNUSED_RESULT; | 299 bool GetHost(content::RenderViewHost** host) const WARN_UNUSED_RESULT; |
300 | 300 |
301 // Unpacks |unique_id| and fills |form_group| and |variant| with the | 301 // Unpacks |unique_id| and fills |form_group| and |variant| with the |
302 // appropriate data source and variant index. Returns false if the unpacked | 302 // appropriate data source and variant index. Returns false if the unpacked |
303 // id cannot be found. | 303 // id cannot be found. |
304 bool GetProfileOrCreditCard(int unique_id, | 304 bool GetProfileOrCreditCard(int unique_id, |
305 const FormGroup** form_group, | 305 const AutofillDataModel** data_model, |
306 size_t* variant) const WARN_UNUSED_RESULT; | 306 size_t* variant) const WARN_UNUSED_RESULT; |
307 | 307 |
308 // Fills |form_structure| cached element corresponding to |form|. | 308 // Fills |form_structure| cached element corresponding to |form|. |
309 // Returns false if the cached element was not found. | 309 // Returns false if the cached element was not found. |
310 bool FindCachedForm(const FormData& form, | 310 bool FindCachedForm(const FormData& form, |
311 FormStructure** form_structure) const WARN_UNUSED_RESULT; | 311 FormStructure** form_structure) const WARN_UNUSED_RESULT; |
312 | 312 |
313 // Fills |form_structure| and |autofill_field| with the cached elements | 313 // Fills |form_structure| and |autofill_field| with the cached elements |
314 // corresponding to |form| and |field|. This might have the side-effect of | 314 // corresponding to |form| and |field|. This might have the side-effect of |
315 // updating the cache. Returns false if the |form| is not autofillable, or if | 315 // updating the cache. Returns false if the |form| is not autofillable, or if |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 461 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
462 UserHappinessFormLoadAndSubmission); | 462 UserHappinessFormLoadAndSubmission); |
463 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 463 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
464 | 464 |
465 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 465 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
466 }; | 466 }; |
467 | 467 |
468 } // namespace autofill | 468 } // namespace autofill |
469 | 469 |
470 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ | 470 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |