diff options
| author | Ben Murdoch <benm@google.com> | 2010-09-10 21:21:28 +0100 |
|---|---|---|
| committer | Steve Block <steveblock@google.com> | 2010-09-23 17:07:42 +0100 |
| commit | c95d7f499ee3250e2d4a51f7e8f04bb6ebfc6add (patch) | |
| tree | c0a08b300482f0cef7e37a0305bcef1898f8ace3 /WebKit/android/WebCoreSupport/autofill/WebAutoFill.h | |
| parent | 45ca37e14f3f68f52a77e0d06514716809ed89ab (diff) | |
| download | external_webkit-c95d7f499ee3250e2d4a51f7e8f04bb6ebfc6add.zip external_webkit-c95d7f499ee3250e2d4a51f7e8f04bb6ebfc6add.tar.gz external_webkit-c95d7f499ee3250e2d4a51f7e8f04bb6ebfc6add.tar.bz2 | |
Integrate AutoFill with WebTextView in Java.
Adds the necessary JNI hooks so that when the user focuses a form
field that AutoFill has identified as "autofillable", the Java side
WebTextView will show an option in the auto complete drop down box
that when selected will call back to AutoFill in native code and
actually fill out the form.
AutoFill is still disabled at compile time by default. To test the
feature set ENABLE_AUTOFILL=true and rebuild WebKit.
Needs a corresponding frameworks/base change.
Change-Id: Ie76ff9cbf0b44f3f3644079ed64ce71bfbc9859a
Diffstat (limited to 'WebKit/android/WebCoreSupport/autofill/WebAutoFill.h')
| -rw-r--r-- | WebKit/android/WebCoreSupport/autofill/WebAutoFill.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.h b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.h index 335f9b2..986e1a2 100644 --- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.h +++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.h @@ -57,8 +57,10 @@ public: void searchDocument(WebCore::Document*); void formFieldFocused(WebCore::HTMLFormControlElement*); - void fillFormFields(int queryId, const string16& value, const string16& label, int uniqueId); + void fillFormFields(int queryId); + void querySuccessful(int queryId, const string16& value, const string16& label, int uniqueId); void fillFormInPage(int queryId, const webkit_glue::FormData& form); + void setWebViewCore(WebViewCore* webViewCore) { mWebViewCore = webViewCore; } private: OwnPtr<FormManager> mFormManager; @@ -69,9 +71,19 @@ private: typedef std::vector<webkit_glue::FormData, std::allocator<webkit_glue::FormData> > FormList; FormList mForms; - typedef std::map<int, webkit_glue::FormData*> AutoFillQueryMap; - AutoFillQueryMap mQueryMap; + typedef std::map<int, webkit_glue::FormData*> AutoFillQueryFormDataMap; + AutoFillQueryFormDataMap mQueryMap; + + typedef struct { + string16 value; + string16 label; + int uniqueId; + } AutoFillSuggestion; + typedef std::map<int, AutoFillSuggestion> AutoFillQuerySuggestionMap; + AutoFillQuerySuggestionMap mSuggestionMap; int mQueryId; + + WebViewCore* mWebViewCore; }; } |
