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

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: Hard coding input element position 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
« no previous file with comments | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/browser/autofill/autofill_manager_unittest.cc » ('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 cba8bfcb20206a589e413b1b297347cede6ebc39..490d80021b67ea513f3462716b87847e91f0cc79 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -52,6 +52,7 @@
#include "grit/generated_resources.h"
#include "ipc/ipc_message_macros.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/gfx/rect.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/form_data_predictions.h"
#include "webkit/glue/form_field.h"
@@ -311,6 +312,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 +442,16 @@ 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_)
- external_delegate_->OnQuery(query_id, form, field);
+ if (external_delegate_) {
+ external_delegate_->OnQuery(query_id, form, field, bounding_box);
+ }
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.
« no previous file with comments | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/browser/autofill/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698