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

Unified Diff: webkit/glue/editor_client_impl.cc

Issue 279001: Move autofill related WebView{Delegate} methods into the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/autofill_form.cc ('k') | webkit/glue/password_autocomplete_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/editor_client_impl.cc
===================================================================
--- webkit/glue/editor_client_impl.cc (revision 29209)
+++ webkit/glue/editor_client_impl.cc (working copy)
@@ -671,8 +671,8 @@
if (!listener)
return;
- std::wstring value =
- webkit_glue::StringToStdWString(input_element->value());
+ string16 value =
+ webkit_glue::StringToString16(input_element->value());
listener->OnBlur(input_element, value);
}
@@ -706,7 +706,7 @@
return false;
}
- std::wstring name = AutofillForm::GetNameForInputElement(input_element);
+ string16 name = AutofillForm::GetNameForInputElement(input_element);
if (name.empty()) // If the field has no name, then we won't have values.
return false;
@@ -736,7 +736,7 @@
OwnPtr<AutofillArgs> args(autofill_args_.release());
WebCore::HTMLInputElement* input_element = args->input_element.get();
- std::wstring value = webkit_glue::StringToStdWString(input_element->value());
+ string16 value = webkit_glue::StringToString16(input_element->value());
// Enforce autofill_on_empty_value and caret_at_end.
bool is_caret_at_end = args->require_caret_at_end ?
@@ -766,12 +766,13 @@
}
// Then trigger form autofill.
- std::wstring name = AutofillForm::GetNameForInputElement(input_element);
+ string16 name = AutofillForm::GetNameForInputElement(input_element);
ASSERT(static_cast<int>(name.length()) > 0);
- if (webview_->delegate())
- webview_->delegate()->QueryFormFieldAutofill(name, value,
- reinterpret_cast<int64>(input_element));
+ if (webview_->client()) {
+ webview_->client()->queryAutofillSuggestions(
+ webkit_glue::NodeToWebNode(input_element), name, value);
+ }
}
void EditorClientImpl::CancelPendingAutofill() {
@@ -785,7 +786,7 @@
WebFrameImpl::FromFrame(text_field->document()->frame());
webkit_glue::PasswordAutocompleteListener* listener =
webframe->GetPasswordListener(text_field);
- std::wstring value = webkit_glue::StringToStdWString(text_field->value());
+ string16 value = webkit_glue::StringToString16(text_field->value());
// Password listeners need to autocomplete other fields that depend on the
// input element with autofill suggestions.
if (listener)
« no previous file with comments | « webkit/glue/autofill_form.cc ('k') | webkit/glue/password_autocomplete_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698