OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef WEBKIT_GLUE_FORM_AUTOCOMPLETE_LISTENER_ | |
6 #define WEBKIT_GLUE_FORM_AUTOCOMPLETE_LISTENER_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "webkit/glue/autocomplete_input_listener.h" | |
11 | |
12 class WebViewDelegate; | |
13 | |
14 namespace webkit_glue { | |
15 | |
16 // This class listens for the user typing in a text input in a form and queries | |
17 // the browser for autofill information. | |
18 | |
19 class FormAutocompleteListener : public AutocompleteInputListener { | |
20 public: | |
21 explicit FormAutocompleteListener(WebViewDelegate* webview_delegate); | |
22 virtual ~FormAutocompleteListener() { } | |
23 | |
24 // AutocompleteInputListener implementation. | |
25 virtual void OnBlur(WebCore::HTMLInputElement* input_element, | |
26 const std::wstring& user_input) { } | |
27 virtual void OnInlineAutocompleteNeeded(WebCore::HTMLInputElement* element, | |
28 const std::wstring& user_input); | |
29 | |
30 private: | |
31 // The delegate associated with the WebView that contains thhe input we are | |
32 // listening to. | |
33 WebViewDelegate* webview_delegate_; | |
34 | |
35 DISALLOW_COPY_AND_ASSIGN(FormAutocompleteListener); | |
36 }; | |
37 | |
38 } // webkit_glue | |
39 | |
40 #endif // WEBKIT_GLUE_FORM_AUTOCOMPLETE_LISTENER_ | |
OLD | NEW |