Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 2192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2203 } | 2203 } |
| 2204 | 2204 |
| 2205 void AutofillDialogViews::InputEditedOrActivated(ServerFieldType type, | 2205 void AutofillDialogViews::InputEditedOrActivated(ServerFieldType type, |
| 2206 const gfx::Rect& bounds, | 2206 const gfx::Rect& bounds, |
| 2207 bool was_edit) { | 2207 bool was_edit) { |
| 2208 DCHECK_NE(UNKNOWN_TYPE, type); | 2208 DCHECK_NE(UNKNOWN_TYPE, type); |
| 2209 | 2209 |
| 2210 DecoratedTextfield* decorated = TextfieldForType(type); | 2210 DecoratedTextfield* decorated = TextfieldForType(type); |
| 2211 views::Combobox* combobox = ComboboxForType(type); | 2211 views::Combobox* combobox = ComboboxForType(type); |
| 2212 DCHECK_NE(!!combobox, !!decorated); | 2212 DCHECK_NE(!!combobox, !!decorated); |
| 2213 | |
| 2214 if (!combobox && !decorated) | |
|
Evan Stade
2014/02/14 22:26:11
this is fine, but please put the DCHECK_NE below t
Dan Beam
2014/02/14 22:47:35
Done.
| |
| 2215 return; | |
| 2216 | |
| 2213 DetailsGroup* group = decorated ? GroupForView(decorated) : | 2217 DetailsGroup* group = decorated ? GroupForView(decorated) : |
| 2214 GroupForView(combobox); | 2218 GroupForView(combobox); |
| 2215 base::string16 text = decorated ? | 2219 base::string16 text = decorated ? |
| 2216 decorated->text() : | 2220 decorated->text() : |
| 2217 combobox->model()->GetItemAt(combobox->selected_index()); | 2221 combobox->model()->GetItemAt(combobox->selected_index()); |
| 2218 DCHECK(group); | 2222 DCHECK(group); |
| 2219 | 2223 |
| 2220 delegate_->UserEditedOrActivatedInput(group->section, | 2224 delegate_->UserEditedOrActivatedInput(group->section, |
| 2221 type, | 2225 type, |
| 2222 GetWidget()->GetNativeView(), | 2226 GetWidget()->GetNativeView(), |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2442 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2446 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
| 2443 : section(section), | 2447 : section(section), |
| 2444 container(NULL), | 2448 container(NULL), |
| 2445 manual_input(NULL), | 2449 manual_input(NULL), |
| 2446 suggested_info(NULL), | 2450 suggested_info(NULL), |
| 2447 suggested_button(NULL) {} | 2451 suggested_button(NULL) {} |
| 2448 | 2452 |
| 2449 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2453 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
| 2450 | 2454 |
| 2451 } // namespace autofill | 2455 } // namespace autofill |
| OLD | NEW |