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> |
| 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_manager_delegate.h" | 24 #include "components/autofill/core/browser/autofill_manager_delegate.h" |
| 25 #include "components/autofill/core/browser/form_structure.h" | 25 #include "components/autofill/core/browser/form_structure.h" |
| 26 #include "components/autofill/core/browser/personal_data_manager.h" | 26 #include "components/autofill/core/browser/personal_data_manager.h" |
| 27 #include "components/autofill/core/common/form_data.h" | 27 #include "components/autofill/core/common/form_data.h" |
| 28 #include "components/autofill/core/common/forms_seen_state.h" | 28 #include "components/autofill/core/common/forms_seen_state.h" |
| 29 #include "third_party/WebKit/public/web/WebFormElement.h" | 29 #include "third_party/WebKit/public/web/WebFormControlElement.h" |
|
vabr (Chromium)
2014/01/10 18:40:00
Do not include WebFormControllElement.h, when you
| |
| 30 | 30 |
| 31 class GURL; | 31 class GURL; |
| 32 | 32 |
| 33 namespace blink { | |
| 34 class WebFormElement; | |
| 35 } | |
| 36 | |
| 33 namespace content { | 37 namespace content { |
| 34 class RenderViewHost; | 38 class RenderViewHost; |
| 35 class WebContents; | 39 class WebContents; |
| 36 } | 40 } |
| 37 | 41 |
| 38 namespace gfx { | 42 namespace gfx { |
| 39 class Rect; | 43 class Rect; |
| 40 class RectF; | 44 class RectF; |
| 41 } | 45 } |
| 42 | 46 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 const base::TimeTicks& timestamp); | 132 const base::TimeTicks& timestamp); |
| 129 | 133 |
| 130 void OnTextFieldDidChange(const FormData& form, | 134 void OnTextFieldDidChange(const FormData& form, |
| 131 const FormFieldData& field, | 135 const FormFieldData& field, |
| 132 const base::TimeTicks& timestamp); | 136 const base::TimeTicks& timestamp); |
| 133 | 137 |
| 134 // The |bounding_box| is a window relative value. | 138 // The |bounding_box| is a window relative value. |
| 135 void OnQueryFormFieldAutofill(int query_id, | 139 void OnQueryFormFieldAutofill(int query_id, |
| 136 const FormData& form, | 140 const FormData& form, |
| 137 const FormFieldData& field, | 141 const FormFieldData& field, |
| 142 const blink::WebFormElement& webformelement, | |
| 138 const gfx::RectF& bounding_box, | 143 const gfx::RectF& bounding_box, |
| 139 bool display_warning); | 144 bool display_warning); |
| 140 void OnDidEndTextFieldEditing(); | 145 void OnDidEndTextFieldEditing(); |
| 141 void OnHideAutofillUI(); | 146 void OnHideAutofillUI(); |
| 142 void OnAddPasswordFormMapping( | 147 void OnAddPasswordFormMapping( |
| 143 const FormFieldData& form, | 148 const FormFieldData& form, |
| 144 const PasswordFormFillData& fill_data); | 149 const PasswordFormFillData& fill_data); |
| 145 void OnShowPasswordSuggestions( | 150 void OnShowPasswordSuggestions( |
| 146 const FormFieldData& field, | 151 const FormFieldData& field, |
| 152 const blink::WebFormElement& element, | |
| 147 const gfx::RectF& bounds, | 153 const gfx::RectF& bounds, |
| 148 const std::vector<base::string16>& suggestions, | 154 const std::vector<base::string16>& suggestions, |
| 149 const std::vector<base::string16>& realms); | 155 const std::vector<base::string16>& realms); |
| 150 void OnSetDataList(const std::vector<base::string16>& values, | 156 void OnSetDataList(const std::vector<base::string16>& values, |
| 151 const std::vector<base::string16>& labels); | 157 const std::vector<base::string16>& labels); |
| 152 | 158 |
| 153 // Try and upload |form|. This differs from OnFormSubmitted() in a few ways. | 159 // Try and upload |form|. This differs from OnFormSubmitted() in a few ways. |
| 154 // - This function will only label the first <input type="password"> field | 160 // - This function will only label the first <input type="password"> field |
| 155 // as ACCOUNT_CREATION_PASSWORD. Other fields will stay unlabeled, as they | 161 // as ACCOUNT_CREATION_PASSWORD. Other fields will stay unlabeled, as they |
| 156 // should have been labeled during the upload for OnFormSubmitted(). | 162 // should have been labeled during the upload for OnFormSubmitted(). |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 364 UserHappinessFormLoadAndSubmission); | 370 UserHappinessFormLoadAndSubmission); |
| 365 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 371 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
| 366 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 372 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
| 367 FormSubmittedAutocompleteEnabled); | 373 FormSubmittedAutocompleteEnabled); |
| 368 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 374 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 369 }; | 375 }; |
| 370 | 376 |
| 371 } // namespace autofill | 377 } // namespace autofill |
| 372 | 378 |
| 373 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 379 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| OLD | NEW |