summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
diff options
context:
space:
mode:
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();