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

Side by Side Diff: webkit/glue/webview_impl.cc

Issue 155399: Add autofill dropdown support for password forms. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/password_autocomplete_listener_unittest.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2007 Google Inc. All Rights Reserved. 2 * Copyright 2007 Google Inc. All Rights Reserved.
3 * 3 *
4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
5 * 5 *
6 * ***** BEGIN LICENSE BLOCK ***** 6 * ***** BEGIN LICENSE BLOCK *****
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 style_.reset(new PopupMenuStyle(Color::black, Color::white, font, true, 173 style_.reset(new PopupMenuStyle(Color::black, Color::white, font, true,
174 Length(WebCore::Fixed), LTR)); 174 Length(WebCore::Fixed), LTR));
175 } 175 }
176 176
177 virtual ~AutocompletePopupMenuClient() { 177 virtual ~AutocompletePopupMenuClient() {
178 } 178 }
179 179
180 // WebCore::PopupMenuClient implementation. 180 // WebCore::PopupMenuClient implementation.
181 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) { 181 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) {
182 text_field_->setValue(suggestions_[listIndex]); 182 text_field_->setValue(suggestions_[listIndex]);
183 EditorClientImpl* editor =
184 static_cast<EditorClientImpl*>(webview_->page()->editorClient());
185 DCHECK(editor);
186 editor->OnAutofillSuggestionAccepted(
187 static_cast<WebCore::HTMLInputElement*>(text_field_.get()));
183 } 188 }
184 189
185 virtual WebCore::String itemText(unsigned list_index) const { 190 virtual WebCore::String itemText(unsigned list_index) const {
186 return suggestions_[list_index]; 191 return suggestions_[list_index];
187 } 192 }
188 193
189 virtual bool itemIsEnabled(unsigned listIndex) const { 194 virtual bool itemIsEnabled(unsigned listIndex) const {
190 return true; 195 return true;
191 } 196 }
192 197
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 1871
1867 return document->focusedNode(); 1872 return document->focusedNode();
1868 } 1873 }
1869 1874
1870 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { 1875 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) {
1871 IntPoint doc_point( 1876 IntPoint doc_point(
1872 page_->mainFrame()->view()->windowToContents(pos)); 1877 page_->mainFrame()->view()->windowToContents(pos));
1873 return page_->mainFrame()->eventHandler()-> 1878 return page_->mainFrame()->eventHandler()->
1874 hitTestResultAtPoint(doc_point, false); 1879 hitTestResultAtPoint(doc_point, false);
1875 } 1880 }
OLDNEW
« no previous file with comments | « webkit/glue/password_autocomplete_listener_unittest.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698