Chromium Code Reviews| Index: chrome/browser/ui/views/autofill/autofill_dialog_views.cc |
| diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc |
| index edd5c2fd5c879e7e7f5c256872d373731261f8ea..8af4e7dbacff7936795a323d42c14b9e2a31fd5f 100644 |
| --- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc |
| +++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc |
| @@ -955,10 +955,14 @@ void AutofillDialogViews::GetUserInput(DialogSection section, |
| DetailsGroup* group = GroupForSection(section); |
| for (TextfieldMap::const_iterator it = group->textfields.begin(); |
| it != group->textfields.end(); ++it) { |
| + if (!it->second->textfield()->enabled()) |
|
Evan Stade
2013/05/25 00:41:19
This isn't necessary, and I'd just as soon leave i
Dan Beam
2013/05/25 02:36:57
Done.
|
| + continue; |
| output->insert(std::make_pair(it->first, it->second->textfield()->text())); |
| } |
| for (ComboboxMap::const_iterator it = group->comboboxes.begin(); |
| it != group->comboboxes.end(); ++it) { |
| + if (!it->second->enabled()) |
| + continue; |
| output->insert(std::make_pair(it->first, |
| it->second->model()->GetItemAt(it->second->selected_index()))); |
| } |
| @@ -1507,6 +1511,7 @@ void AutofillDialogViews::UpdateSectionImpl( |
| if (text_mapping != group->textfields.end()) { |
| views::Textfield* textfield = text_mapping->second->textfield(); |
| + textfield->SetEnabled(input.enabled); |
| if (textfield->text().empty() || clobber_inputs) { |
| textfield->SetText(iter->initial_value); |
| textfield->SetIcon(controller_->IconForField( |
| @@ -1517,6 +1522,7 @@ void AutofillDialogViews::UpdateSectionImpl( |
| ComboboxMap::iterator combo_mapping = group->comboboxes.find(&input); |
| if (combo_mapping != group->comboboxes.end()) { |
| views::Combobox* combobox = combo_mapping->second; |
| + combobox->SetEnabled(input.enabled); |
| if (combobox->selected_index() == combobox->model()->GetDefaultIndex() || |
| clobber_inputs) { |
| for (int i = 0; i < combobox->model()->GetItemCount(); ++i) { |
| @@ -1620,6 +1626,9 @@ bool AutofillDialogViews::ValidateGroup( |
| if (group.manual_input->visible()) { |
| for (TextfieldMap::const_iterator iter = group.textfields.begin(); |
| iter != group.textfields.end(); ++iter) { |
| + if (!iter->first->enabled) |
| + continue; |
| + |
| detail_outputs[iter->first] = iter->second->textfield()->text(); |
| field_map[iter->first->type] = base::Bind( |
| &AutofillDialogViews::SetValidityForInput<DecoratedTextfield>, |
| @@ -1628,6 +1637,9 @@ bool AutofillDialogViews::ValidateGroup( |
| } |
| for (ComboboxMap::const_iterator iter = group.comboboxes.begin(); |
| iter != group.comboboxes.end(); ++iter) { |
| + if (!iter->first->enabled) |
| + continue; |
| + |
| views::Combobox* combobox = iter->second; |
| string16 item = |
| combobox->model()->GetItemAt(combobox->selected_index()); |