summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe_impl.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-20 02:04:41 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-20 02:04:41 +0000
commitddbf30172076500e7b5715201ad7f528f7b3a4d6 (patch)
treef0c468f70520cbda8ed6f73143a329bf944d68f7 /webkit/glue/webframe_impl.cc
parentac82401483eb837c35ea54402cf10ad2393817c4 (diff)
downloadchromium_src-ddbf30172076500e7b5715201ad7f528f7b3a4d6.zip
chromium_src-ddbf30172076500e7b5715201ad7f528f7b3a4d6.tar.gz
chromium_src-ddbf30172076500e7b5715201ad7f528f7b3a4d6.tar.bz2
Review URL: http://codereview.chromium.org/11306
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe_impl.cc')
-rw-r--r--webkit/glue/webframe_impl.cc30
1 files changed, 10 insertions, 20 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 4ee45f9..fa9960c 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -286,7 +286,8 @@ MSVC_POP_WARNING()
frames_scoping_count_(-1),
scoping_complete_(false),
next_invalidate_after_(0),
- printing_(false) {
+ printing_(false),
+ form_autocomplete_listener_(NULL) {
StatsCounter(kWebFrameActiveCount).Increment();
live_object_count_++;
}
@@ -296,7 +297,6 @@ WebFrameImpl::~WebFrameImpl() {
live_object_count_--;
CancelPendingScopingEffort();
- ClearPasswordListeners();
}
// WebFrame -------------------------------------------------------------------
@@ -1873,24 +1873,14 @@ int WebFrameImpl::PendingFrameUnloadEventCount() const {
return frame()->eventHandler()->pendingFrameUnloadEventCount();
}
-void WebFrameImpl::RegisterPasswordListener(
- PassRefPtr<WebCore::HTMLInputElement> input_element,
- webkit_glue::PasswordAutocompleteListener* listener) {
- RefPtr<WebCore::HTMLInputElement> element = input_element;
- DCHECK(password_listeners_.find(element) == password_listeners_.end());
- password_listeners_.set(element, listener);
-}
-
-webkit_glue::PasswordAutocompleteListener* WebFrameImpl::GetPasswordListener(
- WebCore::HTMLInputElement* input_element) {
- return password_listeners_.get(input_element);
-}
-
-void WebFrameImpl::ClearPasswordListeners() {
- for (PasswordListenerMap::iterator iter = password_listeners_.begin();
- iter != password_listeners_.end(); ++iter) {
- delete iter->second;
+webkit_glue::AutocompleteBodyListener* WebFrameImpl::GetAutocompleteListener() {
+ if (!form_autocomplete_listener_) {
+ form_autocomplete_listener_ =
+ adoptRef(new webkit_glue::AutocompleteBodyListener(frame()));
}
- password_listeners_.clear();
+ return form_autocomplete_listener_.get();
}
+void WebFrameImpl::ClearAutocompleteListener() {
+ form_autocomplete_listener_ = NULL;
+}