| 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/editor_view_controller.h" | 5 #include "chrome/browser/ui/views/payments/editor_view_controller.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // TODO(crbug.com/704254): Find how to update the parent view bounds so that | 117 // TODO(crbug.com/704254): Find how to update the parent view bounds so that |
| 118 // the vertical scrollbar size gets updated. | 118 // the vertical scrollbar size gets updated. |
| 119 dialog()->EditorViewUpdated(); | 119 dialog()->EditorViewUpdated(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void EditorViewController::ButtonPressed(views::Button* sender, | 122 void EditorViewController::ButtonPressed(views::Button* sender, |
| 123 const ui::Event& event) { | 123 const ui::Event& event) { |
| 124 switch (sender->tag()) { | 124 switch (sender->tag()) { |
| 125 case static_cast<int>(EditorViewControllerTags::SAVE_BUTTON): | 125 case static_cast<int>(EditorViewControllerTags::SAVE_BUTTON): |
| 126 if (ValidateModelAndSave()) | 126 if (ValidateModelAndSave()) |
| 127 dialog()->GoBack(); | 127 dialog()->GoBackToPaymentSheet(); |
| 128 break; | 128 break; |
| 129 default: | 129 default: |
| 130 PaymentRequestSheetController::ButtonPressed(sender, event); | 130 PaymentRequestSheetController::ButtonPressed(sender, event); |
| 131 break; | 131 break; |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 | 134 |
| 135 void EditorViewController::ContentsChanged(views::Textfield* sender, | 135 void EditorViewController::ContentsChanged(views::Textfield* sender, |
| 136 const base::string16& new_contents) { | 136 const base::string16& new_contents) { |
| 137 static_cast<ValidatingTextfield*>(sender)->OnContentsChanged(); | 137 static_cast<ValidatingTextfield*>(sender)->OnContentsChanged(); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 error_label->SetFontList( | 242 error_label->SetFontList( |
| 243 error_label->GetDefaultFontList().DeriveWithSizeDelta(-1)); | 243 error_label->GetDefaultFontList().DeriveWithSizeDelta(-1)); |
| 244 error_label->SetEnabledColor(error_label->GetNativeTheme()->GetSystemColor( | 244 error_label->SetEnabledColor(error_label->GetNativeTheme()->GetSystemColor( |
| 245 ui::NativeTheme::kColorId_AlertSeverityHigh)); | 245 ui::NativeTheme::kColorId_AlertSeverityHigh)); |
| 246 error_labels_[field] = error_label.get(); | 246 error_labels_[field] = error_label.get(); |
| 247 | 247 |
| 248 layout->AddView(error_label.release()); | 248 layout->AddView(error_label.release()); |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace payments | 251 } // namespace payments |
| OLD | NEW |