| 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 "base/strings/string_piece.h" |
| 12 #include "components/autofill/core/common/password_form.h" | 13 #include "components/autofill/core/common/password_form.h" |
| 13 #include "components/autofill/core/common/password_form_field_prediction_map.h" | 14 #include "components/autofill/core/common/password_form_field_prediction_map.h" |
| 14 #include "third_party/WebKit/public/platform/WebString.h" | 15 #include "third_party/WebKit/public/platform/WebString.h" |
| 15 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 16 | 17 |
| 17 namespace blink { | 18 namespace blink { |
| 18 class WebFormElement; | 19 class WebFormElement; |
| 19 class WebFormControlElement; | 20 class WebFormControlElement; |
| 20 class WebFrame; | 21 class WebFrame; |
| 21 class WebInputElement; | 22 class WebInputElement; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Same as CreatePasswordFormFromWebForm() but for input elements that are not | 56 // Same as CreatePasswordFormFromWebForm() but for input elements that are not |
| 56 // enclosed in <form> element. | 57 // enclosed in <form> element. |
| 57 std::unique_ptr<PasswordForm> CreatePasswordFormFromUnownedInputElements( | 58 std::unique_ptr<PasswordForm> CreatePasswordFormFromUnownedInputElements( |
| 58 const blink::WebFrame& frame, | 59 const blink::WebFrame& frame, |
| 59 const FieldValueAndPropertiesMaskMap* nonscript_modified_values, | 60 const FieldValueAndPropertiesMaskMap* nonscript_modified_values, |
| 60 const FormsPredictionsMap* form_predictions); | 61 const FormsPredictionsMap* form_predictions); |
| 61 | 62 |
| 62 // Checks in a case-insensitive way if the autocomplete attribute for the given | 63 // Checks in a case-insensitive way if the autocomplete attribute for the given |
| 63 // |element| is present and has the specified |value_in_lowercase|. | 64 // |element| is present and has the specified |value_in_lowercase|. |
| 64 bool HasAutocompleteAttributeValue(const blink::WebInputElement& element, | 65 bool HasAutocompleteAttributeValue(const blink::WebInputElement& element, |
| 65 const char* value_in_lowercase); | 66 base::StringPiece value_in_lowercase); |
| 66 | 67 |
| 67 // Checks in a case-insensitive way if credit card autocomplete attributes for | 68 // Checks in a case-insensitive way if credit card autocomplete attributes for |
| 68 // the given |element| are present. | 69 // the given |element| are present. |
| 69 bool HasCreditCardAutocompleteAttributes(const blink::WebInputElement& element); | 70 bool HasCreditCardAutocompleteAttributes(const blink::WebInputElement& element); |
| 70 | 71 |
| 71 // Returns whether the form |field| has a "password" type, but looks like a | 72 // Returns whether the form |field| has a "password" type, but looks like a |
| 72 // credit card verification field. | 73 // credit card verification field. |
| 73 bool IsCreditCardVerificationPasswordField(const blink::WebInputElement& field); | 74 bool IsCreditCardVerificationPasswordField(const blink::WebInputElement& field); |
| 74 | 75 |
| 75 // The "Realm" for the sign-on. This is scheme, host, port. | 76 // The "Realm" for the sign-on. This is scheme, host, port. |
| 76 std::string GetSignOnRealm(const GURL& origin); | 77 std::string GetSignOnRealm(const GURL& origin); |
| 77 | 78 |
| 78 } // namespace autofill | 79 } // namespace autofill |
| 79 | 80 |
| 80 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H
__ | 81 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H
__ |
| OLD | NEW |