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

Unified Diff: chrome/browser/autofill/autofill_manager.cc

Issue 11539003: Pop up requestAutocomplete UI when autofill server hints chrome client that it is in a multipage au… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Resolve with AutofillDialogController refactoring. Created 7 years, 11 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 | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/browser/autofill/autofill_metrics.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 7da1731b9a78b33b77a19282251bd3f5c6b3cefd..90f6874ff550b0c7805e5bce8bd162e410bebf3c 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -23,6 +23,8 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/api/infobars/infobar_service.h"
#include "chrome/browser/api/sync/profile_sync_service_base.h"
+#include "chrome/browser/autofill/autocheckout_manager.h"
+#include "chrome/browser/autofill/autocheckout_infobar_delegate.h"
#include "chrome/browser/autofill/autocomplete_history_manager.h"
#include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
#include "chrome/browser/autofill/autofill_country.h"
@@ -200,6 +202,7 @@ AutofillManager::AutofillManager(content::WebContents* web_contents,
download_manager_(delegate->GetBrowserContext(), this),
disable_download_manager_requests_(false),
autocomplete_history_manager_(web_contents),
+ autocheckout_manager_(this),
metric_logger_(new AutofillMetrics),
has_logged_autofill_enabled_(false),
has_logged_address_suggestions_count_(false),
@@ -575,6 +578,18 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
}
}
}
+
+ // If form is known to be at the start of the autofillable flow (i.e, when
+ // Autofill server said so), then trigger payments UI while also returning
+ // standard autofill suggestions to renderer process.
+ if (form_structure->IsStartOfAutofillableFlow()) {
+ AutocheckoutInfoBarDelegate::Create(
+ *metric_logger_,
+ form.origin,
+ form.ssl_status,
+ &autocheckout_manager_,
+ manager_delegate_->GetInfoBarService());
+ }
}
// Add the results from AutoComplete. They come back asynchronously, so we
@@ -749,6 +764,10 @@ void AutofillManager::RemoveAutocompleteEntry(const string16& name,
autocomplete_history_manager_.OnRemoveAutocompleteEntry(name, value);
}
+content::WebContents* AutofillManager::GetWebContents() {
+ return web_contents();
+}
+
void AutofillManager::OnAddPasswordFormMapping(
const FormFieldData& form,
const PasswordFormFillData& fill_data) {
@@ -947,6 +966,7 @@ AutofillManager::AutofillManager(content::WebContents* web_contents,
download_manager_(delegate->GetBrowserContext(), this),
disable_download_manager_requests_(true),
autocomplete_history_manager_(web_contents),
+ autocheckout_manager_(this),
metric_logger_(new AutofillMetrics),
has_logged_autofill_enabled_(false),
has_logged_address_suggestions_count_(false),
« no previous file with comments | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/browser/autofill/autofill_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698