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

Unified Diff: chrome/browser/ui/views/payments/editor_view_controller.cc

Issue 2805263003: [Payments] Selecting incomplete items will open editors (Closed)
Patch Set: fix ios test for realz Created 3 years, 8 months 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/ui/views/payments/editor_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/editor_view_controller.cc b/chrome/browser/ui/views/payments/editor_view_controller.cc
index cd427557adeda92c6ea35d85684128ce223229d9..d666611f7e3963e53f14acd54a35ea937a9871b8 100644
--- a/chrome/browser/ui/views/payments/editor_view_controller.cc
+++ b/chrome/browser/ui/views/payments/editor_view_controller.cc
@@ -204,6 +204,7 @@ void EditorViewController::CreateInputField(views::GridLayout* layout,
if (field.control_type == EditorField::ControlType::TEXTFIELD) {
ValidatingTextfield* text_field =
new ValidatingTextfield(CreateValidationDelegate(field));
+ text_field->SetText(GetInitialValueForType(field.type));
text_field->set_controller(this);
// Using autofill field type as a view ID (for testing).
text_field->set_id(static_cast<int>(field.type));
@@ -218,6 +219,7 @@ void EditorViewController::CreateInputField(views::GridLayout* layout,
} else if (field.control_type == EditorField::ControlType::COMBOBOX) {
ValidatingCombobox* combobox = new ValidatingCombobox(
GetComboboxModelForType(field.type), CreateValidationDelegate(field));
+ combobox->SelectValue(GetInitialValueForType(field.type));
// Using autofill field type as a view ID (for testing).
combobox->set_id(static_cast<int>(field.type));
combobox->set_listener(this);

Powered by Google App Engine
This is Rietveld 408576698