| 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 CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 int max_length, | 98 int max_length, |
| 99 const content::PasswordForm& form); | 99 const content::PasswordForm& form); |
| 100 | 100 |
| 101 // Remove the credit card or Autofill profile that matches |unique_id| | 101 // Remove the credit card or Autofill profile that matches |unique_id| |
| 102 // from the database. | 102 // from the database. |
| 103 void RemoveAutofillProfileOrCreditCard(int unique_id); | 103 void RemoveAutofillProfileOrCreditCard(int unique_id); |
| 104 | 104 |
| 105 // Remove the specified Autocomplete entry. | 105 // Remove the specified Autocomplete entry. |
| 106 void RemoveAutocompleteEntry(const string16& name, const string16& value); | 106 void RemoveAutocompleteEntry(const string16& name, const string16& value); |
| 107 | 107 |
| 108 void ShowWalletDialog(const FormData& form, |
| 109 const GURL& frame_url, |
| 110 const content::SSLStatus& ssl_status); |
| 111 |
| 108 protected: | 112 protected: |
| 109 // Only test code should subclass AutofillManager. | 113 // Only test code should subclass AutofillManager. |
| 110 friend class base::RefCounted<AutofillManager>; | 114 friend class base::RefCounted<AutofillManager>; |
| 111 | 115 |
| 112 AutofillManager(content::WebContents* web_contents, | 116 AutofillManager(content::WebContents* web_contents, |
| 113 autofill::AutofillManagerDelegate* delegate); | 117 autofill::AutofillManagerDelegate* delegate); |
| 114 virtual ~AutofillManager(); | 118 virtual ~AutofillManager(); |
| 115 | 119 |
| 116 // The string/int pair is composed of the guid string and variant index | 120 // The string/int pair is composed of the guid string and variant index |
| 117 // respectively. The variant index is an index into the multi-valued item | 121 // respectively. The variant index is an index into the multi-valued item |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 void OnRequestAutocomplete(const FormData& form, | 235 void OnRequestAutocomplete(const FormData& form, |
| 232 const GURL& frame_url, | 236 const GURL& frame_url, |
| 233 const content::SSLStatus& ssl_status); | 237 const content::SSLStatus& ssl_status); |
| 234 | 238 |
| 235 // Passes return data for an OnRequestAutocomplete call back to the page. | 239 // Passes return data for an OnRequestAutocomplete call back to the page. |
| 236 void ReturnAutocompleteData(const FormStructure* result); | 240 void ReturnAutocompleteData(const FormStructure* result); |
| 237 | 241 |
| 238 // Tell the renderer the current interactive autocomplete failed somehow. | 242 // Tell the renderer the current interactive autocomplete failed somehow. |
| 239 void ReturnAutocompleteError(); | 243 void ReturnAutocompleteError(); |
| 240 | 244 |
| 245 // Passes return data for an ShowWalletDialog call back to the page. |
| 246 void ReturnWalletAutofillData(const FormStructure* result); |
| 247 |
| 241 // Fills |host| with the RenderViewHost for this tab. | 248 // Fills |host| with the RenderViewHost for this tab. |
| 242 // Returns false if Autofill is disabled or if the host is unavailable. | 249 // Returns false if Autofill is disabled or if the host is unavailable. |
| 243 bool GetHost(content::RenderViewHost** host) const WARN_UNUSED_RESULT; | 250 bool GetHost(content::RenderViewHost** host) const WARN_UNUSED_RESULT; |
| 244 | 251 |
| 245 // Unpacks |unique_id| and fills |form_group| and |variant| with the | 252 // Unpacks |unique_id| and fills |form_group| and |variant| with the |
| 246 // appropriate data source and variant index. Returns false if the unpacked | 253 // appropriate data source and variant index. Returns false if the unpacked |
| 247 // id cannot be found. | 254 // id cannot be found. |
| 248 bool GetProfileOrCreditCard(int unique_id, | 255 bool GetProfileOrCreditCard(int unique_id, |
| 249 const FormGroup** form_group, | 256 const FormGroup** form_group, |
| 250 size_t* variant) const WARN_UNUSED_RESULT; | 257 size_t* variant) const WARN_UNUSED_RESULT; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 399 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
| 393 TestTabContentsWithExternalDelegate); | 400 TestTabContentsWithExternalDelegate); |
| 394 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 401 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
| 395 UserHappinessFormLoadAndSubmission); | 402 UserHappinessFormLoadAndSubmission); |
| 396 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 403 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
| 397 | 404 |
| 398 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 405 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 399 }; | 406 }; |
| 400 | 407 |
| 401 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 408 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| OLD | NEW |