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

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

Issue 2905733002: [WebPayments] Disabling done button when form invalid (Closed)
Patch Set: nits Created 3 years, 6 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 std::unique_ptr<ValidationDelegate> CreateValidationDelegate( 43 std::unique_ptr<ValidationDelegate> CreateValidationDelegate(
44 const EditorField& field) override; 44 const EditorField& field) override;
45 std::unique_ptr<ui::ComboboxModel> GetComboboxModelForType( 45 std::unique_ptr<ui::ComboboxModel> GetComboboxModelForType(
46 const autofill::ServerFieldType& type) override; 46 const autofill::ServerFieldType& type) override;
47 47
48 protected: 48 protected:
49 // PaymentRequestSheetController: 49 // PaymentRequestSheetController:
50 base::string16 GetSheetTitle() override; 50 base::string16 GetSheetTitle() override;
51 51
52 private: 52 private:
53 bool ValidateModel();
54 // Uses the values in the UI fields to populate the corresponding values in 53 // Uses the values in the UI fields to populate the corresponding values in
55 // |profile|. 54 // |profile|.
56 void PopulateProfile(autofill::AutofillProfile* profile); 55 void PopulateProfile(autofill::AutofillProfile* profile);
57 bool GetSheetId(DialogViewID* sheet_id) override; 56 bool GetSheetId(DialogViewID* sheet_id) override;
58 57
59 autofill::AutofillProfile* profile_to_edit_; 58 autofill::AutofillProfile* profile_to_edit_;
60 59
61 // Called when |profile_to_edit_| was successfully edited. 60 // Called when |profile_to_edit_| was successfully edited.
62 base::OnceClosure on_edited_; 61 base::OnceClosure on_edited_;
63 // Called when a new profile was added. The const reference is short-lived, 62 // Called when a new profile was added. The const reference is short-lived,
(...skipping 24 matching lines...) Expand all
88 EditorField field_; 87 EditorField field_;
89 // Outlives this class. Never null. 88 // Outlives this class. Never null.
90 EditorViewController* controller_; 89 EditorViewController* controller_;
91 const std::string& locale_; 90 const std::string& locale_;
92 }; 91 };
93 }; 92 };
94 93
95 } // namespace payments 94 } // namespace payments
96 95
97 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_ H_ 96 #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