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

Unified Diff: components/autofill/core/browser/autofill_external_delegate.cc

Issue 69293007: Abstracted AutofillMsg_SetNodeText IPC out of core autofill code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unittest. Created 7 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
Index: components/autofill/core/browser/autofill_external_delegate.cc
diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc
index 3eace9bf4c5968054e1655b4bef4f6449070af09..8c5994163afce2b7d9ef03375956cc0e0fa3dd1d 100644
--- a/components/autofill/core/browser/autofill_external_delegate.cc
+++ b/components/autofill/core/browser/autofill_external_delegate.cc
@@ -24,8 +24,7 @@ AutofillExternalDelegate::AutofillExternalDelegate(
content::WebContents* web_contents,
AutofillManager* autofill_manager,
AutofillDriver* autofill_driver)
- : web_contents_(web_contents),
blundell 2013/11/13 11:55:45 Yay!
- autofill_manager_(autofill_manager),
+ : autofill_manager_(autofill_manager),
autofill_driver_(autofill_driver),
password_autofill_manager_(web_contents),
autofill_query_id_(0),
@@ -180,8 +179,6 @@ void AutofillExternalDelegate::DidSelectSuggestion(int identifier) {
void AutofillExternalDelegate::DidAcceptSuggestion(const base::string16& value,
int identifier) {
- RenderViewHost* host = web_contents_->GetRenderViewHost();
-
if (identifier == WebAutofillClient::MenuItemIDAutofillOptions) {
// User selected 'Autofill Options'.
autofill_manager_->OnShowAutofillDialog();
@@ -196,7 +193,7 @@ void AutofillExternalDelegate::DidAcceptSuggestion(const base::string16& value,
autofill_driver_->RendererShouldAcceptDataListSuggestion(value);
} else if (identifier == WebAutofillClient::MenuItemIDAutocompleteEntry) {
// User selected an Autocomplete, so we fill directly.
- host->Send(new AutofillMsg_SetNodeText(host->GetRoutingID(), value));
+ autofill_driver_->RendererShouldSetNodeText(value);
} else {
FillAutofillFormData(identifier, false);
}

Powered by Google App Engine
This is Rietveld 408576698