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 COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ |
6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 content::WebContents* GetWebContents() const; | 115 content::WebContents* GetWebContents() const; |
116 | 116 |
117 // Returns the present form structures seen by Autofill manager. | 117 // Returns the present form structures seen by Autofill manager. |
118 const std::vector<FormStructure*>& GetFormStructures(); | 118 const std::vector<FormStructure*>& GetFormStructures(); |
119 | 119 |
120 // Causes the dialog for request autocomplete feature to be shown. | 120 // Causes the dialog for request autocomplete feature to be shown. |
121 virtual void ShowRequestAutocompleteDialog( | 121 virtual void ShowRequestAutocompleteDialog( |
122 const FormData& form, | 122 const FormData& form, |
123 const GURL& source_url, | 123 const GURL& source_url, |
124 autofill::DialogType dialog_type, | 124 autofill::DialogType dialog_type, |
125 const base::Callback<void(const FormStructure*)>& callback); | 125 const base::Callback<void(const FormStructure*, |
| 126 const std::string&)>& callback); |
126 | 127 |
127 // Happens when the autocomplete dialog runs its callback when being closed. | 128 // Happens when the autocomplete dialog runs its callback when being closed. |
128 void RequestAutocompleteDialogClosed(); | 129 void RequestAutocompleteDialogClosed(); |
129 | 130 |
130 autofill::AutofillManagerDelegate* delegate() const { | 131 autofill::AutofillManagerDelegate* delegate() const { |
131 return manager_delegate_; | 132 return manager_delegate_; |
132 } | 133 } |
133 | 134 |
134 // Only for testing. | 135 // Only for testing. |
135 void SetTestDelegate(autofill::AutofillManagerTestDelegate* delegate); | 136 void SetTestDelegate(autofill::AutofillManagerTestDelegate* delegate); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 void OnSetDataList(const std::vector<string16>& values, | 261 void OnSetDataList(const std::vector<string16>& values, |
261 const std::vector<string16>& labels, | 262 const std::vector<string16>& labels, |
262 const std::vector<string16>& icons, | 263 const std::vector<string16>& icons, |
263 const std::vector<int>& unique_ids); | 264 const std::vector<int>& unique_ids); |
264 | 265 |
265 // Requests an interactive autocomplete UI be shown. | 266 // Requests an interactive autocomplete UI be shown. |
266 void OnRequestAutocomplete(const FormData& form, | 267 void OnRequestAutocomplete(const FormData& form, |
267 const GURL& frame_url); | 268 const GURL& frame_url); |
268 | 269 |
269 // Passes return data for an OnRequestAutocomplete call back to the page. | 270 // Passes return data for an OnRequestAutocomplete call back to the page. |
270 void ReturnAutocompleteData(const FormStructure* result); | 271 void ReturnAutocompleteData(const FormStructure* result, |
| 272 const std::string& unused_transaction_id); |
271 | 273 |
272 // Called to signal clicking an element failed in some way during an | 274 // Called to signal clicking an element failed in some way during an |
273 // Autocheckout flow. | 275 // Autocheckout flow. |
274 void OnClickFailed(autofill::AutocheckoutStatus status); | 276 void OnClickFailed(autofill::AutocheckoutStatus status); |
275 | 277 |
276 // Shows the Autocheckout bubble if conditions are right. See comments for | 278 // Shows the Autocheckout bubble if conditions are right. See comments for |
277 // AutocheckoutManager::MaybeShowAutocheckoutBubble. |source_url| is the site | 279 // AutocheckoutManager::MaybeShowAutocheckoutBubble. |source_url| is the site |
278 // Autocheckout is being offered on. |ssl_status| is the SSL status of the | 280 // Autocheckout is being offered on. |ssl_status| is the SSL status of the |
279 // page. |bounding_box| is the bounding box of the input field in focus. | 281 // page. |bounding_box| is the bounding box of the input field in focus. |
280 void OnMaybeShowAutocheckoutBubble(const GURL& source_url, | 282 void OnMaybeShowAutocheckoutBubble(const GURL& source_url, |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 449 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
448 TestTabContentsWithExternalDelegate); | 450 TestTabContentsWithExternalDelegate); |
449 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 451 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
450 UserHappinessFormLoadAndSubmission); | 452 UserHappinessFormLoadAndSubmission); |
451 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 453 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
452 | 454 |
453 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 455 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
454 }; | 456 }; |
455 | 457 |
456 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ | 458 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |