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

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

Issue 8490017: Setting up external delegate calls to allow a future delegate to handle autofill (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removing unneeded IPC calls Created 9 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: chrome/browser/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 575407d0fee0a9ecc63fb11c4017d4ca4041cd4b..227c9870243ad167bc5889485c62bd763b672dd9 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -311,6 +311,8 @@ bool AutofillManager::OnMessageReceived(const IPC::Message& message) {
OnDidFillAutofillFormData)
IPC_MESSAGE_HANDLER(AutofillHostMsg_DidShowAutofillSuggestions,
OnDidShowAutofillSuggestions)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_HideAutofillPopup,
+ OnHideAutofillPopup)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -439,14 +441,17 @@ void AutofillManager::OnTextFieldDidChange(const FormData& form,
void AutofillManager::OnQueryFormFieldAutofill(int query_id,
const FormData& form,
- const FormField& field) {
+ const FormField& field,
+ const gfx::Rect& bounding_box) {
std::vector<string16> values;
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- if (external_delegate_)
+ if (external_delegate_) {
external_delegate_->OnQuery(query_id, form, field);
+ external_delegate_->SetAutofillElementBounds(bounding_box);
Ilya Sherman 2011/11/09 20:34:19 nit: Are you sure you want these to be two separat
csharp 2011/11/10 18:09:32 Hmmm, I don't think we would need to call them sep
+ }
RenderViewHost* host = NULL;
FormStructure* form_structure = NULL;
@@ -673,6 +678,11 @@ void AutofillManager::OnDidShowAutofillSuggestions(bool is_new_popup) {
}
}
+void AutofillManager::OnHideAutofillPopup() {
+ if (external_delegate_)
+ external_delegate_->HideAutofillPopup();
+}
+
void AutofillManager::OnLoadedServerPredictions(
const std::string& response_xml) {
// Parse and store the server predictions.

Powered by Google App Engine
This is Rietveld 408576698