Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: webkit/glue/form_autocomplete_listener.cc

Issue 8885: Implementation of the UI part of the autofill (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/form_autocomplete_listener.h ('k') | webkit/glue/password_autocomplete_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/form_autocomplete_listener.cc
===================================================================
--- webkit/glue/form_autocomplete_listener.cc (revision 0)
+++ webkit/glue/form_autocomplete_listener.cc (revision 0)
@@ -0,0 +1,35 @@
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "webkit/glue/form_autocomplete_listener.h"
+
+MSVC_PUSH_WARNING_LEVEL(0);
+#include "HTMLInputElement.h"
+MSVC_POP_WARNING();
+
+#undef LOG
+
+#include "webkit/glue/autocomplete_input_listener.h"
+#include "webkit/glue/glue_util.h"
+#include "webkit/glue/webview_delegate.h"
+
+namespace webkit_glue {
+
+FormAutocompleteListener::FormAutocompleteListener(
+ WebViewDelegate* webview_delegate,
+ WebCore::HTMLInputElement* input_element)
+ : AutocompleteInputListener(new HTMLInputDelegate(input_element)),
+ webview_delegate_(webview_delegate),
+ name_(webkit_glue::StringToStdWString(input_element->name().string())),
+ node_id_(reinterpret_cast<int64>(input_element)) {
+ DCHECK(input_element->isTextField() && !input_element->isPasswordField() &&
+ input_element->autoComplete());
+}
+
+void FormAutocompleteListener::OnInlineAutocompleteNeeded(
+ const std::wstring& user_input) {
+ webview_delegate_->QueryFormFieldAutofill(name_, user_input, node_id_);
+}
+
+} // namespace
Property changes on: webkit\glue\form_autocomplete_listener.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « webkit/glue/form_autocomplete_listener.h ('k') | webkit/glue/password_autocomplete_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698