| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 public base::RefCounted<AutofillManager> { | 70 public base::RefCounted<AutofillManager> { |
| 71 public: | 71 public: |
| 72 static void CreateForWebContentsAndDelegate( | 72 static void CreateForWebContentsAndDelegate( |
| 73 content::WebContents* contents, | 73 content::WebContents* contents, |
| 74 autofill::AutofillManagerDelegate* delegate); | 74 autofill::AutofillManagerDelegate* delegate); |
| 75 static AutofillManager* FromWebContents(content::WebContents* contents); | 75 static AutofillManager* FromWebContents(content::WebContents* contents); |
| 76 | 76 |
| 77 // Registers our Enable/Disable Autofill pref. | 77 // Registers our Enable/Disable Autofill pref. |
| 78 static void RegisterUserPrefs(PrefServiceBase* prefs); | 78 static void RegisterUserPrefs(PrefServiceBase* prefs); |
| 79 | 79 |
| 80 // Set our external delegate. | 80 // Sets an external delegate. |
| 81 // TODO(jrg): consider passing delegate into the ctor. That won't | 81 void SetExternalDelegate(AutofillExternalDelegate* delegate); |
| 82 // work if the delegate has a pointer to the AutofillManager, but | |
| 83 // future directions may not need such a pointer. | |
| 84 void SetExternalDelegate(AutofillExternalDelegate* delegate) { | |
| 85 external_delegate_ = delegate; | |
| 86 } | |
| 87 | 82 |
| 88 // Used to say if this class has an external delegate that it is using. | 83 // Used to say if this class has an external delegate that it is using. |
| 89 bool HasExternalDelegate(); | 84 bool HasExternalDelegate(); |
| 90 | 85 |
| 91 // Called from our external delegate so they cannot be private. | 86 // Called from our external delegate so they cannot be private. |
| 92 virtual void OnFillAutofillFormData(int query_id, | 87 virtual void OnFillAutofillFormData(int query_id, |
| 93 const FormData& form, | 88 const FormData& form, |
| 94 const FormFieldData& field, | 89 const FormFieldData& field, |
| 95 int unique_id); | 90 int unique_id); |
| 96 void OnDidShowAutofillSuggestions(bool is_new_popup); | 91 void OnDidShowAutofillSuggestions(bool is_new_popup); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 TestTabContentsWithExternalDelegate); | 399 TestTabContentsWithExternalDelegate); |
| 405 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 400 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
| 406 UserHappinessFormLoadAndSubmission); | 401 UserHappinessFormLoadAndSubmission); |
| 407 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 402 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
| 408 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FormFillDuration); | 403 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FormFillDuration); |
| 409 | 404 |
| 410 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 405 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 411 }; | 406 }; |
| 412 | 407 |
| 413 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 408 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| OLD | NEW |