From 04347f699d2341d7cf44105e29dc05a84bef2a1c Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Wed, 13 Oct 2010 16:50:47 +0100 Subject: 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 --- WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp') 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 profiles; profiles.push_back(autoFillProfile); -- cgit v1.1