summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_manager.cc17
-rw-r--r--chrome/browser/autofill/autofill_manager.h9
2 files changed, 23 insertions, 3 deletions
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 4a62634..89ce8f4 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -774,16 +774,29 @@ void AutofillManager::OnSetDataList(const std::vector<string16>& values,
}
}
-void AutofillManager::OnRequestAutocomplete(const FormData& form) {
+void AutofillManager::OnRequestAutocomplete(
+ const FormData& form,
+ const GURL& frame_url,
+ const content::SSLStatus& ssl_status) {
base::Callback<void(const FormStructure*)> callback =
base::Bind(&AutofillManager::ReturnAutocompleteData, this);
autofill::AutofillDialogController* controller =
new autofill::AutofillDialogController(web_contents(),
form,
+ frame_url,
+ ssl_status,
callback);
controller->Show();
}
+void AutofillManager::ReturnAutocompleteError() {
+ RenderViewHost* host = web_contents()->GetRenderViewHost();
+ if (!host)
+ return;
+
+ host->Send(new AutofillMsg_RequestAutocompleteError(host->GetRoutingID()));
+}
+
void AutofillManager::ReturnAutocompleteData(const FormStructure* result) {
// web_contents() will be NULL when the interactive autocomplete is closed due
// to a tab or browser window closing.
@@ -795,7 +808,7 @@ void AutofillManager::ReturnAutocompleteData(const FormStructure* result) {
return;
if (!result) {
- host->Send(new AutofillMsg_RequestAutocompleteError(host->GetRoutingID()));
+ ReturnAutocompleteError();
return;
}
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index 44bf2b8..20e4ae9 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -26,6 +26,7 @@
#include "chrome/browser/autofill/field_types.h"
#include "chrome/browser/autofill/form_structure.h"
#include "content/public/browser/web_contents_observer.h"
+#include "content/public/common/ssl_status.h"
class AutofillExternalDelegate;
class AutofillField;
@@ -33,6 +34,7 @@ class AutofillProfile;
class AutofillMetrics;
class CreditCard;
class FormGroup;
+class GURL;
class PersonalDataManager;
class PrefService;
class ProfileSyncService;
@@ -226,11 +228,16 @@ class AutofillManager : public content::WebContentsObserver,
const std::vector<int>& unique_ids);
// Requests an interactive autocomplete UI be shown.
- void OnRequestAutocomplete(const FormData& form);
+ void OnRequestAutocomplete(const FormData& form,
+ const GURL& frame_url,
+ const content::SSLStatus& ssl_status);
// Passes return data for an OnRequestAutocomplete call back to the page.
void ReturnAutocompleteData(const FormStructure* result);
+ // Tell the renderer the current interactive autocomplete failed somehow.
+ void ReturnAutocompleteError();
+
// Fills |host| with the RenderViewHost for this tab.
// Returns false if Autofill is disabled or if the host is unavailable.
bool GetHost(content::RenderViewHost** host) const WARN_UNUSED_RESULT;