| 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 the field represented by |fieldData| should show an entry to prompt |
| 89 // the user to give Chrome access to the user's address book. |
| 90 bool ShouldShowAccessAddressBookSuggestion(const FormData& data, |
| 91 const FormFieldData& field_data); |
| 92 |
| 93 // If Chrome has not prompted for access to the user's address book, the |
| 94 // method prompts the user for permission and blocks the process. Otherwise, |
| 95 // this method has no effect. The return value reflects whether the user was |
| 96 // prompted with a modal dialog. |
| 97 bool AccessAddressBook(); |
| 98 #endif // defined(OS_MACOSX) |
| 99 |
| 87 // Called from our external delegate so they cannot be private. | 100 // Called from our external delegate so they cannot be private. |
| 88 virtual void FillOrPreviewForm(AutofillDriver::RendererFormDataAction action, | 101 virtual void FillOrPreviewForm(AutofillDriver::RendererFormDataAction action, |
| 89 int query_id, | 102 int query_id, |
| 90 const FormData& form, | 103 const FormData& form, |
| 91 const FormFieldData& field, | 104 const FormFieldData& field, |
| 92 int unique_id); | 105 int unique_id); |
| 93 void DidShowSuggestions(bool is_new_popup); | 106 void DidShowSuggestions(bool is_new_popup); |
| 94 void OnDidFillAutofillFormData(const base::TimeTicks& timestamp); | 107 void OnDidFillAutofillFormData(const base::TimeTicks& timestamp); |
| 108 void OnPingAck(); |
| 95 void OnDidPreviewAutofillFormData(); | 109 void OnDidPreviewAutofillFormData(); |
| 96 | 110 |
| 97 // Remove the credit card or Autofill profile that matches |unique_id| | 111 // Remove the credit card or Autofill profile that matches |unique_id| |
| 98 // from the database. | 112 // from the database. |
| 99 void RemoveAutofillProfileOrCreditCard(int unique_id); | 113 void RemoveAutofillProfileOrCreditCard(int unique_id); |
| 100 | 114 |
| 101 // Remove the specified Autocomplete entry. | 115 // Remove the specified Autocomplete entry. |
| 102 void RemoveAutocompleteEntry(const base::string16& name, | 116 void RemoveAutocompleteEntry(const base::string16& name, |
| 103 const base::string16& value); | 117 const base::string16& value); |
| 104 | 118 |
| (...skipping 252 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 |