diff options
author | Ben Murdoch <benm@google.com> | 2010-10-13 16:50:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-10-14 15:42:12 +0100 |
commit | 04347f699d2341d7cf44105e29dc05a84bef2a1c (patch) | |
tree | fc4ededae10221ea1a1db050f07740990c8437fd /WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp | |
parent | a5ffb7c279df240a07658953e1bd5df6d0480cb6 (diff) | |
download | external_webkit-04347f699d2341d7cf44105e29dc05a84bef2a1c.zip external_webkit-04347f699d2341d7cf44105e29dc05a84bef2a1c.tar.gz external_webkit-04347f699d2341d7cf44105e29dc05a84bef2a1c.tar.bz2 |
Support the complete AutoFill profile.
Load all AutoFill profile values from Java. Requires a
corresponding change in frameworks/base:
https://android-git.corp.google.com/g/#change,74046
Change-Id: I4567d0879f364647b649c0f3c80ce8e32423b371
Diffstat (limited to 'WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp')
-rw-r--r-- | WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp index ce0a455..4774778 100644 --- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp +++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp @@ -167,13 +167,23 @@ bool WebAutoFill::enabled() const return page ? page->settings()->autoFillEnabled() : false; } -void WebAutoFill::setProfile(const string16& fullName, const string16& emailAddress) +void WebAutoFill::setProfile(const string16& fullName, const string16& emailAddress, const string16& companyName, const string16& addressLine1, + const string16& addressLine2, const string16& city, const string16& state, const string16& zipCode, + const string16& country, const string16& phoneNumber) { AutoFillProfile autoFillProfile; // Constants for AutoFill field types are found in external/chromium/chrome/browser/autofill/field_types.h. autoFillProfile.SetInfo(AutoFillType(NAME_FULL), fullName); autoFillProfile.SetInfo(AutoFillType(EMAIL_ADDRESS), emailAddress); + autoFillProfile.SetInfo(AutoFillType(COMPANY_NAME), companyName); + autoFillProfile.SetInfo(AutoFillType(ADDRESS_HOME_LINE1), addressLine1); + autoFillProfile.SetInfo(AutoFillType(ADDRESS_HOME_LINE2), addressLine2); + autoFillProfile.SetInfo(AutoFillType(ADDRESS_HOME_CITY), city); + autoFillProfile.SetInfo(AutoFillType(ADDRESS_HOME_STATE), state); + autoFillProfile.SetInfo(AutoFillType(ADDRESS_HOME_ZIP), zipCode); + autoFillProfile.SetInfo(AutoFillType(ADDRESS_HOME_COUNTRY), country); + autoFillProfile.SetInfo(AutoFillType(PHONE_HOME_WHOLE_NUMBER), phoneNumber); std::vector<AutoFillProfile> profiles; profiles.push_back(autoFillProfile); |