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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 content::WebContents* GetWebContents() const; | 116 content::WebContents* GetWebContents() const; |
117 | 117 |
118 // Returns the present form structures seen by Autofill manager. | 118 // Returns the present form structures seen by Autofill manager. |
119 const std::vector<FormStructure*>& GetFormStructures(); | 119 const std::vector<FormStructure*>& GetFormStructures(); |
120 | 120 |
121 // Causes the dialog for request autocomplete feature to be shown. | 121 // Causes the dialog for request autocomplete feature to be shown. |
122 virtual void ShowRequestAutocompleteDialog( | 122 virtual void ShowRequestAutocompleteDialog( |
123 const FormData& form, | 123 const FormData& form, |
124 const GURL& source_url, | 124 const GURL& source_url, |
125 const content::SSLStatus& ssl_status, | 125 const content::SSLStatus& ssl_status, |
| 126 autofill::DialogRequester requester, |
126 const base::Callback<void(const FormStructure*)>& callback); | 127 const base::Callback<void(const FormStructure*)>& callback); |
127 | 128 |
128 // Happens when the autocomplete dialog runs its callback when being closed. | 129 // Happens when the autocomplete dialog runs its callback when being closed. |
129 void RequestAutocompleteDialogClosed(); | 130 void RequestAutocompleteDialogClosed(); |
130 | 131 |
131 protected: | 132 protected: |
132 // Only test code should subclass AutofillManager. | 133 // Only test code should subclass AutofillManager. |
133 friend class base::RefCounted<AutofillManager>; | 134 friend class base::RefCounted<AutofillManager>; |
134 | 135 |
135 AutofillManager(content::WebContents* web_contents, | 136 AutofillManager(content::WebContents* web_contents, |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // Should be set to true in AutofillManagerTest and other tests, false in | 352 // Should be set to true in AutofillManagerTest and other tests, false in |
352 // AutofillDownloadManagerTest and in non-test environment. Is false by | 353 // AutofillDownloadManagerTest and in non-test environment. Is false by |
353 // default for the public constructor, and true by default for the test-only | 354 // default for the public constructor, and true by default for the test-only |
354 // constructors. | 355 // constructors. |
355 bool disable_download_manager_requests_; | 356 bool disable_download_manager_requests_; |
356 | 357 |
357 // Handles single-field autocomplete form data. | 358 // Handles single-field autocomplete form data. |
358 AutocompleteHistoryManager autocomplete_history_manager_; | 359 AutocompleteHistoryManager autocomplete_history_manager_; |
359 | 360 |
360 // Handles autocheckout flows. | 361 // Handles autocheckout flows. |
361 AutocheckoutManager autocheckout_manager_; | 362 autofill::AutocheckoutManager autocheckout_manager_; |
362 | 363 |
363 // For logging UMA metrics. Overridden by metrics tests. | 364 // For logging UMA metrics. Overridden by metrics tests. |
364 scoped_ptr<const AutofillMetrics> metric_logger_; | 365 scoped_ptr<const AutofillMetrics> metric_logger_; |
365 // Have we logged whether Autofill is enabled for this page load? | 366 // Have we logged whether Autofill is enabled for this page load? |
366 bool has_logged_autofill_enabled_; | 367 bool has_logged_autofill_enabled_; |
367 // Have we logged an address suggestions count metric for this page? | 368 // Have we logged an address suggestions count metric for this page? |
368 bool has_logged_address_suggestions_count_; | 369 bool has_logged_address_suggestions_count_; |
369 // Have we shown Autofill suggestions at least once? | 370 // Have we shown Autofill suggestions at least once? |
370 bool did_show_suggestions_; | 371 bool did_show_suggestions_; |
371 // Has the user manually edited at least one form field among the autofillable | 372 // Has the user manually edited at least one form field among the autofillable |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 428 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
428 TestTabContentsWithExternalDelegate); | 429 TestTabContentsWithExternalDelegate); |
429 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 430 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
430 UserHappinessFormLoadAndSubmission); | 431 UserHappinessFormLoadAndSubmission); |
431 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 432 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
432 | 433 |
433 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 434 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
434 }; | 435 }; |
435 | 436 |
436 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 437 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
OLD | NEW |