| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/payments/validating_combobox.h" | 5 #include "chrome/browser/ui/views/payments/validating_combobox.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ui/base/models/combobox_model.h" | 9 #include "ui/base/models/combobox_model.h" |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // before as part of a blur. | 38 // before as part of a blur. |
| 39 if (!was_blurred_) | 39 if (!was_blurred_) |
| 40 return; | 40 return; |
| 41 | 41 |
| 42 Validate(); | 42 Validate(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void ValidatingCombobox::OnComboboxModelChanged( | 45 void ValidatingCombobox::OnComboboxModelChanged( |
| 46 ui::ComboboxModel* unused_model) { | 46 ui::ComboboxModel* unused_model) { |
| 47 ModelChanged(); | 47 ModelChanged(); |
| 48 delegate_->ComboboxModelChanged(this); |
| 48 } | 49 } |
| 49 | 50 |
| 50 void ValidatingCombobox::Validate() { | 51 void ValidatingCombobox::Validate() { |
| 51 // ValidateCombobox may have side-effects, such as displaying errors. | 52 // ValidateCombobox may have side-effects, such as displaying errors. |
| 52 SetInvalid(!delegate_->ValidateCombobox(this)); | 53 SetInvalid(!delegate_->ValidateCombobox(this)); |
| 53 } | 54 } |
| 54 | 55 |
| 55 } // namespace payments | 56 } // namespace payments |
| OLD | NEW |