| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebPasswordFormUtils_h | 31 #ifndef WebPasswordFormUtils_h |
| 32 #define WebPasswordFormUtils_h | 32 #define WebPasswordFormUtils_h |
| 33 | 33 |
| 34 #include "heap/Handle.h" |
| 34 #include <wtf/Vector.h> | 35 #include <wtf/Vector.h> |
| 35 #include <wtf/text/WTFString.h> | 36 #include <wtf/text/WTFString.h> |
| 36 | 37 |
| 37 namespace WebCore { | 38 namespace WebCore { |
| 38 class HTMLInputElement; | 39 class HTMLInputElement; |
| 39 class HTMLFormControlElement; | 40 class HTMLFormControlElement; |
| 40 class HTMLFormElement; | 41 class HTMLFormElement; |
| 41 } | 42 } |
| 42 | 43 |
| 43 namespace WebKit { | 44 namespace WebKit { |
| 44 | 45 |
| 45 // Helper structure to locate username, passwords and submit fields. | 46 // Helper structure to locate username, passwords and submit fields. |
| 46 // | 47 // |
| 47 // Note that we don't check autocomplete property here. The applications using | 48 // Note that we don't check autocomplete property here. The applications using |
| 48 // password forms can use WebPasswordFormData.passwordShouldAutocomplete to | 49 // password forms can use WebPasswordFormData.passwordShouldAutocomplete to |
| 49 // implement their own heuristics related autocomplete. | 50 // implement their own heuristics related autocomplete. |
| 50 struct PasswordFormFields { | 51 struct PasswordFormFields { |
| 52 // FIXME(oilpan): Move PasswordFormFields to the heap and use Members. |
| 51 WebCore::HTMLInputElement* userName; | 53 WebCore::HTMLInputElement* userName; |
| 52 Vector<String> alternateUserNames; | 54 Vector<String> alternateUserNames; |
| 53 Vector<WebCore::HTMLInputElement*> passwords; | 55 Vector<WebCore::HTMLInputElement*> passwords; |
| 54 WebCore::HTMLFormControlElement* submit; | 56 WebCore::HTMLFormControlElement* submit; |
| 55 PasswordFormFields() : userName(0), submit(0) { } | 57 PasswordFormFields() : userName(0), submit(0) { } |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 void findPasswordFormFields(WebCore::HTMLFormElement* form, | 60 void findPasswordFormFields(WebCore::HTMLFormElement* form, |
| 59 PasswordFormFields* fields); | 61 PasswordFormFields* fields); |
| 60 | 62 |
| 61 } // namespace WebKit | 63 } // namespace WebKit |
| 62 | 64 |
| 63 #endif | 65 #endif |
| OLD | NEW |