summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-12-01 10:49:56 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-01 10:49:56 -0800
commit248bc2f34ce5b865a1773ad39f89ece16032f88c (patch)
treef7db0627094f77018b6884c3b30f720cbc6acceb /WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
parent220c179db846cc4e65c676a03fef950fc52e1080 (diff)
parent08de3e09322b76f64c2b29ff728ec5bc5ac74339 (diff)
downloadexternal_webkit-248bc2f34ce5b865a1773ad39f89ece16032f88c.zip
external_webkit-248bc2f34ce5b865a1773ad39f89ece16032f88c.tar.gz
external_webkit-248bc2f34ce5b865a1773ad39f89ece16032f88c.tar.bz2
Merge "Do more AutoFill steup lazily"
Diffstat (limited to 'WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp')
-rw-r--r--WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
index 98b250f..73a8460 100644
--- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
+++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
@@ -50,11 +50,17 @@ namespace android
{
WebAutoFill::WebAutoFill()
- : mWebViewCore(0)
+ : mQueryId(1)
+ , mWebViewCore(0)
{
- mFormManager = new FormManager();
- mQueryId = 1;
+}
+
+void WebAutoFill::init()
+{
+ if (mAutoFillManager)
+ return;
+ mFormManager = new FormManager();
AndroidURLRequestContextGetter::Get()->SetURLRequestContext(WebRequestContext::get(false /* isPrivateBrowsing */));
AndroidURLRequestContextGetter::Get()->SetIOThread(WebUrlLoaderClient::ioThread());
mTabContents = new TabContents();
@@ -82,8 +88,7 @@ void WebAutoFill::searchDocument(WebCore::Frame* frame)
if (!enabled())
return;
- if (!mFormManager)
- return;
+ init();
mQueryMap.clear();
mUniqueIdMap.clear();