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

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

Issue 2866443002: [Web Payments] Handle "Enter" accelerator when there's a primary action (Closed)
Patch Set: Add tests to sheets that handle the enter accelerator 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_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 EditorField field_; 82 EditorField field_;
83 // Outlives this class. 83 // Outlives this class.
84 EditorViewController* controller_; 84 EditorViewController* controller_;
85 // The list of supported basic card networks. 85 // The list of supported basic card networks.
86 std::set<std::string> supported_card_networks_; 86 std::set<std::string> supported_card_networks_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(CreditCardValidationDelegate); 88 DISALLOW_COPY_AND_ASSIGN(CreditCardValidationDelegate);
89 }; 89 };
90 90
91 bool GetSheetId(DialogViewID* sheet_id) override;
92
91 // Called when |credit_card_to_edit_| was successfully edited. 93 // Called when |credit_card_to_edit_| was successfully edited.
92 base::OnceClosure on_edited_; 94 base::OnceClosure on_edited_;
93 // Called when a new card was added. The const reference is short-lived, and 95 // Called when a new card was added. The const reference is short-lived, and
94 // the callee should make a copy. 96 // the callee should make a copy.
95 base::OnceCallback<void(const autofill::CreditCard&)> on_added_; 97 base::OnceCallback<void(const autofill::CreditCard&)> on_added_;
96 98
97 // If non-nullptr, a pointer to an object to be edited. Must outlive this 99 // If non-nullptr, a pointer to an object to be edited. Must outlive this
98 // controller. 100 // controller.
99 autofill::CreditCard* credit_card_to_edit_; 101 autofill::CreditCard* credit_card_to_edit_;
100 102
101 DISALLOW_COPY_AND_ASSIGN(CreditCardEditorViewController); 103 DISALLOW_COPY_AND_ASSIGN(CreditCardEditorViewController);
102 }; 104 };
103 105
104 } // namespace payments 106 } // namespace payments
105 107
106 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H _ 108 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698