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

Side by Side Diff: chrome/browser/ui/views/payments/contact_info_editor_view_controller.h

Issue 2896263002: [Payments] Changes to validation in the Credit Card editor (Closed)
Patch Set: Initial Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class ContactInfoValidationDelegate : public ValidationDelegate { 67 class ContactInfoValidationDelegate : public ValidationDelegate {
68 public: 68 public:
69 ContactInfoValidationDelegate(const EditorField& field, 69 ContactInfoValidationDelegate(const EditorField& field,
70 const std::string& locale, 70 const std::string& locale,
71 EditorViewController* controller); 71 EditorViewController* controller);
72 ~ContactInfoValidationDelegate() override; 72 ~ContactInfoValidationDelegate() override;
73 73
74 // ValidationDelegate: 74 // ValidationDelegate:
75 bool IsValidTextfield(views::Textfield* textfield) override; 75 bool IsValidTextfield(views::Textfield* textfield) override;
76 bool IsValidCombobox(views::Combobox* combobox) override; 76 bool IsValidCombobox(views::Combobox* combobox) override;
77 bool TextfieldValueChanged(views::Textfield* textfield) override; 77 bool TextfieldValueChanged(views::Textfield* textfield,
78 bool was_blurred) override;
78 bool ComboboxValueChanged(views::Combobox* combobox) override; 79 bool ComboboxValueChanged(views::Combobox* combobox) override;
79 void ComboboxModelChanged(views::Combobox* combobox) override {} 80 void ComboboxModelChanged(views::Combobox* combobox) override {}
80 81
81 private: 82 private:
82 bool ValidateTextfield(views::Textfield* textfield, 83 bool ValidateTextfield(views::Textfield* textfield,
83 base::string16* error_message); 84 base::string16* error_message);
84 85
85 EditorField field_; 86 EditorField field_;
86 // Outlives this class. Never null. 87 // Outlives this class. Never null.
87 EditorViewController* controller_; 88 EditorViewController* controller_;
88 const std::string& locale_; 89 const std::string& locale_;
89 }; 90 };
90 }; 91 };
91 92
92 } // namespace payments 93 } // namespace payments
93 94
94 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_ H_ 95 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698