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

Unified Diff: components/autofill/content/browser/request_autocomplete_manager.cc

Issue 306053008: Rename AutofillManagerDelegate to AutofillClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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
Index: components/autofill/content/browser/request_autocomplete_manager.cc
diff --git a/components/autofill/content/browser/request_autocomplete_manager.cc b/components/autofill/content/browser/request_autocomplete_manager.cc
index 8d6dc5a08fd2b0b49694962937b107dbffccd7ba..31f20f1901f0b1bdf5d716e39b089ee6ef01d3a5 100644
--- a/components/autofill/content/browser/request_autocomplete_manager.cc
+++ b/components/autofill/content/browser/request_autocomplete_manager.cc
@@ -19,15 +19,15 @@ namespace autofill {
namespace {
blink::WebFormElement::AutocompleteResult ToWebkitAutocompleteResult(
- AutofillManagerDelegate::RequestAutocompleteResult result) {
+ AutofillClient::RequestAutocompleteResult result) {
switch(result) {
- case AutofillManagerDelegate::AutocompleteResultSuccess:
+ case AutofillClient::AutocompleteResultSuccess:
return blink::WebFormElement::AutocompleteResultSuccess;
- case AutofillManagerDelegate::AutocompleteResultErrorDisabled:
+ case AutofillClient::AutocompleteResultErrorDisabled:
return blink::WebFormElement::AutocompleteResultErrorDisabled;
- case AutofillManagerDelegate::AutocompleteResultErrorCancel:
+ case AutofillClient::AutocompleteResultErrorCancel:
return blink::WebFormElement::AutocompleteResultErrorCancel;
- case AutofillManagerDelegate::AutocompleteResultErrorInvalid:
+ case AutofillClient::AutocompleteResultErrorInvalid:
return blink::WebFormElement::AutocompleteResultErrorInvalid;
}
@@ -51,19 +51,19 @@ void RequestAutocompleteManager::OnRequestAutocomplete(
if (!IsValidFormData(form))
return;
- AutofillManagerDelegate::ResultCallback callback =
+ AutofillClient::ResultCallback callback =
base::Bind(&RequestAutocompleteManager::ReturnAutocompleteResult,
weak_ptr_factory_.GetWeakPtr());
ShowRequestAutocompleteDialog(form, frame_url, callback);
}
void RequestAutocompleteManager::OnCancelRequestAutocomplete() {
- autofill_driver_->autofill_manager()->delegate()->
- HideRequestAutocompleteDialog();
+ autofill_driver_->autofill_manager()->client()
+ ->HideRequestAutocompleteDialog();
}
void RequestAutocompleteManager::ReturnAutocompleteResult(
- AutofillManagerDelegate::RequestAutocompleteResult result,
+ AutofillClient::RequestAutocompleteResult result,
const base::string16& debug_message,
const FormStructure* form_structure) {
// autofill_driver_->GetWebContents() will be NULL when the interactive
@@ -95,10 +95,9 @@ void RequestAutocompleteManager::ReturnAutocompleteResult(
void RequestAutocompleteManager::ShowRequestAutocompleteDialog(
const FormData& form,
const GURL& source_url,
- const AutofillManagerDelegate::ResultCallback& callback) {
- AutofillManagerDelegate* delegate =
- autofill_driver_->autofill_manager()->delegate();
- delegate->ShowRequestAutocompleteDialog(form, source_url, callback);
+ const AutofillClient::ResultCallback& callback) {
+ AutofillClient* client = autofill_driver_->autofill_manager()->client();
+ client->ShowRequestAutocompleteDialog(form, source_url, callback);
}
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698