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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/scoped_vector.h" | 18 #include "base/memory/scoped_vector.h" |
19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
20 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
22 #include "components/autofill/core/browser/autocomplete_history_manager.h" | 22 #include "components/autofill/core/browser/autocomplete_history_manager.h" |
23 #include "components/autofill/core/browser/autofill_download.h" | 23 #include "components/autofill/core/browser/autofill_download.h" |
24 #include "components/autofill/core/browser/autofill_driver.h" | 24 #include "components/autofill/core/browser/autofill_driver.h" |
25 #include "components/autofill/core/browser/autofill_manager_delegate.h" | 25 #include "components/autofill/core/browser/autofill_manager_delegate.h" |
26 #include "components/autofill/core/browser/form_structure.h" | 26 #include "components/autofill/core/browser/form_structure.h" |
27 #include "components/autofill/core/browser/personal_data_manager.h" | 27 #include "components/autofill/core/browser/personal_data_manager.h" |
28 #include "components/autofill/core/common/form_data.h" | 28 #include "components/autofill/core/common/form_data.h" |
29 #include "components/autofill/core/common/forms_seen_state.h" | |
30 | 29 |
31 class GURL; | 30 class GURL; |
32 | 31 |
33 namespace content { | 32 namespace content { |
34 class RenderViewHost; | 33 class RenderViewHost; |
35 class WebContents; | 34 class WebContents; |
36 } | 35 } |
37 | 36 |
38 namespace gfx { | 37 namespace gfx { |
39 class Rect; | 38 class Rect; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 autofill::AutofillManagerDelegate* delegate() const { | 111 autofill::AutofillManagerDelegate* delegate() const { |
113 return manager_delegate_; | 112 return manager_delegate_; |
114 } | 113 } |
115 | 114 |
116 const std::string& app_locale() const { return app_locale_; } | 115 const std::string& app_locale() const { return app_locale_; } |
117 | 116 |
118 // Only for testing. | 117 // Only for testing. |
119 void SetTestDelegate(autofill::AutofillManagerTestDelegate* delegate); | 118 void SetTestDelegate(autofill::AutofillManagerTestDelegate* delegate); |
120 | 119 |
121 void OnFormsSeen(const std::vector<FormData>& forms, | 120 void OnFormsSeen(const std::vector<FormData>& forms, |
122 const base::TimeTicks& timestamp, | 121 const base::TimeTicks& timestamp); |
123 autofill::FormsSeenState state); | |
124 | 122 |
125 // Processes the submitted |form|, saving any new Autofill data and uploading | 123 // Processes the submitted |form|, saving any new Autofill data and uploading |
126 // the possible field types for the submitted fields to the crowdsourcing | 124 // the possible field types for the submitted fields to the crowdsourcing |
127 // server. Returns false if this form is not relevant for Autofill. | 125 // server. Returns false if this form is not relevant for Autofill. |
128 bool OnFormSubmitted(const FormData& form, | 126 bool OnFormSubmitted(const FormData& form, |
129 const base::TimeTicks& timestamp); | 127 const base::TimeTicks& timestamp); |
130 | 128 |
131 void OnTextFieldDidChange(const FormData& form, | 129 void OnTextFieldDidChange(const FormData& form, |
132 const FormFieldData& field, | 130 const FormFieldData& field, |
133 const base::TimeTicks& timestamp); | 131 const base::TimeTicks& timestamp); |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 UserHappinessFormLoadAndSubmission); | 365 UserHappinessFormLoadAndSubmission); |
368 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 366 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
369 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 367 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
370 FormSubmittedAutocompleteEnabled); | 368 FormSubmittedAutocompleteEnabled); |
371 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 369 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
372 }; | 370 }; |
373 | 371 |
374 } // namespace autofill | 372 } // namespace autofill |
375 | 373 |
376 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 374 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |