| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 | 8 |
| 9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
| 10 #include "FrameLoader.h" | 10 #include "FrameLoader.h" |
| 11 #include "FrameTree.h" | 11 #include "FrameTree.h" |
| 12 #include "Document.h" | 12 #include "Document.h" |
| 13 #include "Element.h" | 13 #include "Element.h" |
| 14 #include "EventListener.h" | 14 #include "EventListener.h" |
| 15 #include "EventNames.h" | 15 #include "EventNames.h" |
| 16 #include "HTMLCollection.h" | 16 #include "HTMLCollection.h" |
| 17 #include "HTMLElement.h" | 17 #include "HTMLElement.h" |
| 18 #include "HTMLFormElement.h" | 18 #include "HTMLFormElement.h" |
| 19 #include "HTMLFrameOwnerElement.h" | 19 #include "HTMLFrameOwnerElement.h" |
| 20 #include "HTMLHeadElement.h" | 20 #include "HTMLHeadElement.h" |
| 21 #include "HTMLInputElement.h" | 21 #include "HTMLInputElement.h" |
| 22 #include "HTMLLinkElement.h" | 22 #include "HTMLLinkElement.h" |
| 23 #include "HTMLMetaElement.h" | 23 #include "HTMLMetaElement.h" |
| 24 #include "HTMLOptionElement.h" | 24 #include "HTMLOptionElement.h" |
| 25 #include "HTMLNames.h" | 25 #include "HTMLNames.h" |
| 26 #include "KURL.h" | 26 #include "KURL.h" |
| 27 MSVC_POP_WARNING(); | 27 MSVC_POP_WARNING(); |
| 28 #undef LOG | 28 #undef LOG |
| 29 | 29 |
| 30 // Brings in more WebKit headers and #undefs LOG again, so this needs to come | |
| 31 // first. | |
| 32 #include "webkit/glue/autocomplete_input_listener.h" | |
| 33 | |
| 34 #include "base/string_util.h" | 30 #include "base/string_util.h" |
| 35 #include "webkit/glue/dom_operations.h" | 31 #include "webkit/glue/dom_operations.h" |
| 36 #include "webkit/glue/form_data.h" | 32 #include "webkit/glue/form_data.h" |
| 37 #include "webkit/glue/glue_util.h" | 33 #include "webkit/glue/glue_util.h" |
| 38 #include "webkit/glue/password_autocomplete_listener.h" | 34 #include "webkit/glue/password_autocomplete_listener.h" |
| 39 #include "webkit/glue/webframe_impl.h" | 35 #include "webkit/glue/webframe_impl.h" |
| 40 #include "webkit/glue/webview_impl.h" | 36 #include "webkit/glue/webview_impl.h" |
| 41 | 37 |
| 42 using WebCore::String; | 38 using WebCore::String; |
| 43 | 39 |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 438 |
| 443 // Get pointer to password element. (We currently only support single | 439 // Get pointer to password element. (We currently only support single |
| 444 // password forms). | 440 // password forms). |
| 445 WebCore::HTMLInputElement* password_element = | 441 WebCore::HTMLInputElement* password_element = |
| 446 form_elements->input_elements[data.basic_data.elements[1]].get(); | 442 form_elements->input_elements[data.basic_data.elements[1]].get(); |
| 447 | 443 |
| 448 WebFrameLoaderClient* frame_loader_client = | 444 WebFrameLoaderClient* frame_loader_client = |
| 449 static_cast<WebFrameLoaderClient*>(username_element->document()-> | 445 static_cast<WebFrameLoaderClient*>(username_element->document()-> |
| 450 frame()->loader()->client()); | 446 frame()->loader()->client()); |
| 451 WebFrameImpl* webframe_impl = frame_loader_client->webframe(); | 447 WebFrameImpl* webframe_impl = frame_loader_client->webframe(); |
| 452 webframe_impl->GetAutocompleteListener()->AddInputListener( | 448 webframe_impl->RegisterPasswordListener( |
| 453 username_element, | 449 username_element, |
| 454 new PasswordAutocompleteListener( | 450 new PasswordAutocompleteListener( |
| 455 new HTMLInputDelegate(username_element), | 451 new HTMLInputDelegate(username_element), |
| 456 new HTMLInputDelegate(password_element), | 452 new HTMLInputDelegate(password_element), |
| 457 data)); | 453 data)); |
| 458 } | 454 } |
| 459 } | 455 } |
| 460 | 456 |
| 461 WebCore::HTMLLinkElement* CastToHTMLLinkElement(WebCore::Node* node) { | 457 WebCore::HTMLLinkElement* CastToHTMLLinkElement(WebCore::Node* node) { |
| 462 return CastHTMLElement<WebCore::HTMLLinkElement>(node, | 458 return CastHTMLElement<WebCore::HTMLLinkElement>(node, |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 if (!app_info->app_url.is_valid()) | 789 if (!app_info->app_url.is_valid()) |
| 794 app_info->app_url = GURL(); | 790 app_info->app_url = GURL(); |
| 795 } | 791 } |
| 796 } | 792 } |
| 797 } | 793 } |
| 798 } | 794 } |
| 799 } | 795 } |
| 800 | 796 |
| 801 } // webkit_glue | 797 } // webkit_glue |
| 802 | 798 |
| OLD | NEW |