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

Unified Diff: webkit/glue/form_autocomplete_listener.h

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/chrome_client_impl.cc ('k') | webkit/glue/form_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.h
===================================================================
--- webkit/glue/form_autocomplete_listener.h (revision 0)
+++ webkit/glue/form_autocomplete_listener.h (revision 0)
@@ -0,0 +1,46 @@
+// 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.
+
+#ifndef WEBKIT_GLUE_FORM_AUTOCOMPLETE_LISTENER_
+#define WEBKIT_GLUE_FORM_AUTOCOMPLETE_LISTENER_
+
+#include <string>
+
+#include "webkit/glue/autocomplete_input_listener.h"
+
+class WebViewDelegate;
+
+namespace webkit_glue {
+
+// This class listens for the user typing in a text input in a form and queries
+// the browser for autofill information.
+
+class FormAutocompleteListener : public AutocompleteInputListener {
+ public:
+ FormAutocompleteListener(WebViewDelegate* webview_delegate,
+ WebCore::HTMLInputElement* input_element);
+ virtual ~FormAutocompleteListener() { }
+
+ // AutocompleteInputListener implementation.
+ virtual void OnBlur(const std::wstring& user_input) { }
+ virtual void OnInlineAutocompleteNeeded(const std::wstring& user_input);
+
+ private:
+ // The delegate associated with the WebView that contains thhe input we are
+ // listening to.
+ WebViewDelegate* webview_delegate_;
+
+ // The name of the input node we are listening to.
+ std::wstring name_;
+
+ // An id to represent the input element. That ID is passed to the call that
+ // queries for suggestions.
+ int64 node_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(FormAutocompleteListener);
+};
+
+} // webkit_glue
+
+#endif // WEBKIT_GLUE_FORM_AUTOCOMPLETE_LISTENER_
« no previous file with comments | « webkit/glue/chrome_client_impl.cc ('k') | webkit/glue/form_autocomplete_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698