Chromium Code Reviews| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 // Registers our Enable/Disable Autofill pref. | 78 // Registers our Enable/Disable Autofill pref. |
| 79 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 79 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); |
| 80 | 80 |
| 81 AutofillManager(AutofillDriver* driver, | 81 AutofillManager(AutofillDriver* driver, |
| 82 autofill::AutofillManagerDelegate* delegate, | 82 autofill::AutofillManagerDelegate* delegate, |
| 83 const std::string& app_locale, | 83 const std::string& app_locale, |
| 84 AutofillDownloadManagerState enable_download_manager); | 84 AutofillDownloadManagerState enable_download_manager); |
| 85 virtual ~AutofillManager(); | 85 virtual ~AutofillManager(); |
| 86 | 86 |
| 87 // Set an external delegate. | 87 // Set an external delegate. |
| 88 void SetExternalDelegate(AutofillExternalDelegate* delegate); | 88 virtual void SetExternalDelegate(AutofillExternalDelegate* delegate); |
|
Ilya Sherman
2013/06/21 20:19:24
nit: Does this still need to be virtual?
blundell
2013/06/22 06:29:06
Done.
| |
| 89 | 89 |
| 90 // Whether browser process will create and own the Autofill popup UI. | 90 // Whether browser process will create and own the Autofill popup UI. |
| 91 bool IsNativeUiEnabled(); | 91 bool IsNativeUiEnabled(); |
| 92 | 92 |
| 93 // Called from our external delegate so they cannot be private. | 93 // Called from our external delegate so they cannot be private. |
| 94 virtual void OnFillAutofillFormData(int query_id, | 94 virtual void OnFillAutofillFormData(int query_id, |
| 95 const FormData& form, | 95 const FormData& form, |
| 96 const FormFieldData& field, | 96 const FormFieldData& field, |
| 97 int unique_id); | 97 int unique_id); |
| 98 void OnDidShowAutofillSuggestions(bool is_new_popup); | 98 void OnDidShowAutofillSuggestions(bool is_new_popup); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 void OnClickFailed(autofill::AutocheckoutStatus status); | 177 void OnClickFailed(autofill::AutocheckoutStatus status); |
| 178 | 178 |
| 179 // Shows the Autocheckout bubble if conditions are right. See comments for | 179 // Shows the Autocheckout bubble if conditions are right. See comments for |
| 180 // AutocheckoutManager::MaybeShowAutocheckoutBubble. Input element requesting | 180 // AutocheckoutManager::MaybeShowAutocheckoutBubble. Input element requesting |
| 181 // bubble belongs to |form|. |bounding_box| is the bounding box of the input | 181 // bubble belongs to |form|. |bounding_box| is the bounding box of the input |
| 182 // field in focus. | 182 // field in focus. |
| 183 virtual void OnMaybeShowAutocheckoutBubble(const FormData& form, | 183 virtual void OnMaybeShowAutocheckoutBubble(const FormData& form, |
| 184 const gfx::RectF& bounding_box); | 184 const gfx::RectF& bounding_box); |
| 185 | 185 |
| 186 // Resets cache. | 186 // Resets cache. |
| 187 void Reset(); | 187 virtual void Reset(); |
| 188 | 188 |
| 189 protected: | 189 protected: |
| 190 // Test code should prefer to use this constructor. | 190 // Test code should prefer to use this constructor. |
| 191 AutofillManager(AutofillDriver* driver, | 191 AutofillManager(AutofillDriver* driver, |
| 192 autofill::AutofillManagerDelegate* delegate, | 192 autofill::AutofillManagerDelegate* delegate, |
| 193 PersonalDataManager* personal_data); | 193 PersonalDataManager* personal_data); |
| 194 | 194 |
| 195 // Returns the value of the AutofillEnabled pref. | 195 // Returns the value of the AutofillEnabled pref. |
| 196 virtual bool IsAutofillEnabled() const; | 196 virtual bool IsAutofillEnabled() const; |
| 197 | 197 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 409 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 409 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
| 410 UserHappinessFormLoadAndSubmission); | 410 UserHappinessFormLoadAndSubmission); |
| 411 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 411 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
| 412 | 412 |
| 413 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 413 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 414 }; | 414 }; |
| 415 | 415 |
| 416 } // namespace autofill | 416 } // namespace autofill |
| 417 | 417 |
| 418 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 418 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| OLD | NEW |