diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/autofill/autofill_manager.cc | 12 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_manager.h | 3 | ||||
-rw-r--r-- | chrome/browser/autofill/form_structure.cc | 5 | ||||
-rw-r--r-- | chrome/browser/autofill/form_structure.h | 7 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 4 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.h | 4 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host_delegate.h | 4 |
7 files changed, 21 insertions, 18 deletions
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc index d49dd4c..ee44c75 100644 --- a/chrome/browser/autofill/autofill_manager.cc +++ b/chrome/browser/autofill/autofill_manager.cc @@ -154,7 +154,7 @@ bool AutoFillManager::GetAutoFillSuggestions( } bool AutoFillManager::FillAutoFillFormData(int query_id, - const FormData& form, + const webkit_glue::FormData& form, const string16& name, const string16& label) { if (!IsAutoFillEnabled()) @@ -185,7 +185,7 @@ bool AutoFillManager::FillAutoFillFormData(int query_id, if (!profile) return false; - FormData result = form; + webkit_glue::FormData result = form; for (std::vector<FormStructure*>::const_iterator iter = form_structures_.begin(); iter != form_structures_.end(); ++iter) { @@ -196,10 +196,10 @@ bool AutoFillManager::FillAutoFillFormData(int query_id, for (size_t i = 0; i < form_structure->field_count(); ++i) { const AutoFillField* field = form_structure->field(i); - for (size_t j = 0; j < result.values.size(); ++j) { - if (field->name() == result.elements[j]) { - result.values[j] = - profile->GetFieldText(AutoFillType(field->heuristic_type())); + for (size_t j = 0; j < result.fields.size(); ++j) { + if (field->name() == result.fields[j].name()) { + result.fields[j].set_value( + profile->GetFieldText(AutoFillType(field->heuristic_type()))); break; } } diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h index ecc72d9..fa4593e 100644 --- a/chrome/browser/autofill/autofill_manager.h +++ b/chrome/browser/autofill/autofill_manager.h @@ -14,6 +14,7 @@ #include "chrome/browser/renderer_host/render_view_host_delegate.h" namespace webkit_glue { +struct FormData; class FormField; class FormFieldValues; } @@ -48,7 +49,7 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill, virtual bool GetAutoFillSuggestions(int query_id, const webkit_glue::FormField& field); virtual bool FillAutoFillFormData(int query_id, - const FormData& form, + const webkit_glue::FormData& form, const string16& name, const string16& label); diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc index a93910c..4841da8 100644 --- a/chrome/browser/autofill/form_structure.cc +++ b/chrome/browser/autofill/form_structure.cc @@ -16,6 +16,9 @@ #include "webkit/glue/form_field.h" #include "webkit/glue/form_field_values.h" +using webkit_glue::FormData; +using webkit_glue::FormFieldValues; + namespace { const char* kFormMethodPost = "post"; @@ -55,7 +58,7 @@ static std::string Hash64Bit(const std::string& str) { } // namespace -FormStructure::FormStructure(const webkit_glue::FormFieldValues& values) +FormStructure::FormStructure(const FormFieldValues& values) : form_name_(UTF16ToUTF8(values.form_name)), source_url_(values.source_url), target_url_(values.target_url) { diff --git a/chrome/browser/autofill/form_structure.h b/chrome/browser/autofill/form_structure.h index d91882b..6c41203 100644 --- a/chrome/browser/autofill/form_structure.h +++ b/chrome/browser/autofill/form_structure.h @@ -14,9 +14,8 @@ #include "chrome/browser/autofill/field_types.h" #include "googleurl/src/gurl.h" -struct FormData; - namespace webkit_glue { +struct FormData; class FormFieldValues; } @@ -60,8 +59,8 @@ class FormStructure { return fields_.end(); } - bool operator==(const FormData& form) const; - bool operator!=(const FormData& form) const; + bool operator==(const webkit_glue::FormData& form) const; + bool operator!=(const webkit_glue::FormData& form) const; private: // Associates the field with the heuristic type for each of the field views. diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 6cfd4f8..354acaf 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -1608,7 +1608,7 @@ void RenderViewHost::OnRemoveAutofillEntry(const string16& field_name, } void RenderViewHost::OnFillAutoFillFormData(int query_id, - const FormData& form, + const webkit_glue::FormData& form, const string16& name, const string16& label) { RenderViewHostDelegate::AutoFill* autofill_delegate = @@ -1637,7 +1637,7 @@ void RenderViewHost::AutocompleteSuggestionsReturned( } void RenderViewHost::AutoFillFormDataFilled(int query_id, - const FormData& form) { + const webkit_glue::FormData& form) { Send(new ViewMsg_AutoFillFormDataFilled(routing_id(), query_id, form)); } diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index 4059bec..27fb3ff 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -398,7 +398,7 @@ class RenderViewHost : public RenderWidgetHost { int default_suggestion_index); // Called by the AutoFillManager when the FormData has been filled out. - void AutoFillFormDataFilled(int query_id, const FormData& form); + void AutoFillFormDataFilled(int query_id, const webkit_glue::FormData& form); // Notifies the Renderer that a move or resize of its containing window has // started (this is used to hide the autocomplete popups if any). @@ -590,7 +590,7 @@ class RenderViewHost : public RenderWidgetHost { void OnRemoveAutofillEntry(const string16& field_name, const string16& value); void OnFillAutoFillFormData(int query_id, - const FormData& form, + const webkit_glue::FormData& form, const string16& name, const string16& label); diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index d908e1f..535bb1f 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -19,7 +19,6 @@ struct BookmarkDragData; struct ContextMenuParams; class FilePath; -struct FormData; class GURL; struct NativeWebKeyboardEvent; class NavigationEntry; @@ -54,6 +53,7 @@ class Message; } namespace webkit_glue { +struct FormData; class FormField; class FormFieldValues; struct PasswordForm; @@ -411,7 +411,7 @@ class RenderViewHostDelegate { // matches the |name|, |label| key. Returns true to indicate that // RenderViewHost::AutoFillFormDataFilled has been called. virtual bool FillAutoFillFormData(int query_id, - const FormData& form, + const webkit_glue::FormData& form, const string16& name, const string16& label) = 0; }; |