| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 autofill::AutofillManagerDelegate* delegate, | 77 autofill::AutofillManagerDelegate* delegate, |
| 78 const std::string& app_locale, | 78 const std::string& app_locale, |
| 79 AutofillDownloadManagerState enable_download_manager); | 79 AutofillDownloadManagerState enable_download_manager); |
| 80 virtual ~AutofillManager(); | 80 virtual ~AutofillManager(); |
| 81 | 81 |
| 82 // Sets an external delegate. | 82 // Sets an external delegate. |
| 83 void SetExternalDelegate(AutofillExternalDelegate* delegate); | 83 void SetExternalDelegate(AutofillExternalDelegate* delegate); |
| 84 | 84 |
| 85 void ShowAutofillSettings(); | 85 void ShowAutofillSettings(); |
| 86 | 86 |
| 87 #if defined(OS_MACOSX) |
| 88 // Whether Chromium has prompted the user for permission to access the user's |
| 89 // address book. |
| 90 bool HasPromptedForAccessToAddressBook(); |
| 91 // Whether the field represented by |fieldData| supports autofill from the |
| 92 // user's address book. |
| 93 bool FieldSupportsAddressBookAutofill(const FormData& data, |
| 94 const FormFieldData& fieldData); |
| 95 // If Chromium has not prompted for access to the user's address book, the |
| 96 // method prompts the user for permission and blocks the process. Otherwise, |
| 97 // this method has no effect. |
| 98 void AccessAddressBook(); |
| 99 #endif // defined(OS_MACOSX) |
| 100 |
| 87 // Called from our external delegate so they cannot be private. | 101 // Called from our external delegate so they cannot be private. |
| 88 virtual void FillOrPreviewForm(AutofillDriver::RendererFormDataAction action, | 102 virtual void FillOrPreviewForm(AutofillDriver::RendererFormDataAction action, |
| 89 int query_id, | 103 int query_id, |
| 90 const FormData& form, | 104 const FormData& form, |
| 91 const FormFieldData& field, | 105 const FormFieldData& field, |
| 92 int unique_id); | 106 int unique_id); |
| 93 void DidShowSuggestions(bool is_new_popup); | 107 void DidShowSuggestions(bool is_new_popup); |
| 94 void OnDidFillAutofillFormData(const base::TimeTicks& timestamp); | 108 void OnDidFillAutofillFormData(const base::TimeTicks& timestamp); |
| 95 void OnDidPreviewAutofillFormData(); | 109 void OnDidPreviewAutofillFormData(); |
| 96 | 110 |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 UserHappinessFormLoadAndSubmission); | 371 UserHappinessFormLoadAndSubmission); |
| 358 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 372 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
| 359 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 373 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
| 360 FormSubmittedAutocompleteEnabled); | 374 FormSubmittedAutocompleteEnabled); |
| 361 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 375 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 362 }; | 376 }; |
| 363 | 377 |
| 364 } // namespace autofill | 378 } // namespace autofill |
| 365 | 379 |
| 366 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 380 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| OLD | NEW |