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

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: rebase 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ShouldFormat() override; 75 bool ShouldFormat() override;
76 base::string16 Format(const base::string16& text) override; 76 base::string16 Format(const base::string16& text) override;
77 bool IsValidTextfield(views::Textfield* textfield) override; 77 bool IsValidTextfield(views::Textfield* textfield) override;
78 bool IsValidCombobox(views::Combobox* combobox) override; 78 bool IsValidCombobox(views::Combobox* combobox) override;
79 bool TextfieldValueChanged(views::Textfield* textfield) override; 79 bool TextfieldValueChanged(views::Textfield* textfield,
80 bool was_blurred) override;
80 bool ComboboxValueChanged(views::Combobox* combobox) override; 81 bool ComboboxValueChanged(views::Combobox* combobox) override;
81 void ComboboxModelChanged(views::Combobox* combobox) override {} 82 void ComboboxModelChanged(views::Combobox* combobox) override {}
82 83
83 private: 84 private:
84 bool ValidateTextfield(views::Textfield* textfield, 85 bool ValidateTextfield(views::Textfield* textfield,
85 base::string16* error_message); 86 base::string16* error_message);
86 87
87 EditorField field_; 88 EditorField field_;
88 // Outlives this class. Never null. 89 // Outlives this class. Never null.
89 EditorViewController* controller_; 90 EditorViewController* controller_;
90 const std::string& locale_; 91 const std::string& locale_;
91 }; 92 };
92 }; 93 };
93 94
94 } // namespace payments 95 } // namespace payments
95 96
96 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_ H_ 97 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_ H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698