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_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "components/autofill/core/common/password_form.h" | 12 #include "components/autofill/core/common/password_form.h" |
13 #include "components/autofill/core/common/password_form_field_prediction_map.h" | 13 #include "components/autofill/core/common/password_form_field_prediction_map.h" |
14 #include "third_party/WebKit/public/platform/WebString.h" | 14 #include "third_party/WebKit/public/platform/WebString.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 class WebDocument; | |
19 class WebFormElement; | 18 class WebFormElement; |
20 class WebFormControlElement; | 19 class WebFormControlElement; |
21 class WebFrame; | 20 class WebFrame; |
22 class WebInputElement; | 21 class WebInputElement; |
23 } | 22 } |
24 | 23 |
25 namespace autofill { | 24 namespace autofill { |
26 | 25 |
27 struct FormData; | |
28 struct FormFieldData; | |
29 struct PasswordForm; | 26 struct PasswordForm; |
30 | 27 |
31 // Tests whether the given form is a GAIA reauthentication form. The form is | 28 // Tests whether the given form is a GAIA reauthentication form. The form is |
32 // not passed directly as WebFormElement, but by specifying its |origin| and | 29 // not passed directly as WebFormElement, but by specifying its |origin| and |
33 // |control_elements|. This is for better performance and easier testing. | 30 // |control_elements|. This is for better performance and easier testing. |
34 // TODO(msramek): Move this logic to the browser. | 31 // TODO(msramek): Move this logic to the browser. |
35 bool IsGaiaReauthenticationForm( | 32 bool IsGaiaReauthenticationForm( |
36 const GURL& origin, | 33 const GURL& origin, |
37 const std::vector<blink::WebFormControlElement>& control_elements); | 34 const std::vector<blink::WebFormControlElement>& control_elements); |
38 | 35 |
(...skipping 24 matching lines...) Expand all Loading... |
63 const FormsPredictionsMap* form_predictions); | 60 const FormsPredictionsMap* form_predictions); |
64 | 61 |
65 // Checks in a case-insensitive way if the autocomplete attribute for the given | 62 // Checks in a case-insensitive way if the autocomplete attribute for the given |
66 // |element| is present and has the specified |value_in_lowercase|. | 63 // |element| is present and has the specified |value_in_lowercase|. |
67 bool HasAutocompleteAttributeValue(const blink::WebInputElement& element, | 64 bool HasAutocompleteAttributeValue(const blink::WebInputElement& element, |
68 const char* value_in_lowercase); | 65 const char* value_in_lowercase); |
69 | 66 |
70 } // namespace autofill | 67 } // namespace autofill |
71 | 68 |
72 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H
__ | 69 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H
__ |
OLD | NEW |