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

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

Issue 2841643002: When a new Payments address is created from the editor, use it as the chosen address (Closed)
Patch Set: And yet another small goof fix... :-( Created 3 years, 8 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/payment_request_dialog_view.h » ('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_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 11 matching lines...) Expand all
22 22
23 namespace payments { 23 namespace payments {
24 24
25 class PaymentRequestSpec; 25 class PaymentRequestSpec;
26 class PaymentRequestState; 26 class PaymentRequestState;
27 class PaymentRequestDialogView; 27 class PaymentRequestDialogView;
28 28
29 // Credit card editor screen of the Payment Request flow. 29 // Credit card editor screen of the Payment Request flow.
30 class CreditCardEditorViewController : public EditorViewController { 30 class CreditCardEditorViewController : public EditorViewController {
31 public: 31 public:
32 // Does not take ownership of the arguments, which should outlive this object. 32 // Does not take ownership of the arguments (except for the |on_edited| and
33 // Additionally, |credit_card| could be nullptr if we are adding a card. Else, 33 // |on_added| callbacks), which should outlive this object. Additionally,
34 // it's a valid pointer to a card that needs to be updated, and which will 34 // |credit_card| could be nullptr if we are adding a card. Else, it's a valid
35 // outlive this controller. 35 // pointer to a card that needs to be updated, and which will outlive this
36 // controller.
36 CreditCardEditorViewController( 37 CreditCardEditorViewController(
37 PaymentRequestSpec* spec, 38 PaymentRequestSpec* spec,
38 PaymentRequestState* state, 39 PaymentRequestState* state,
39 PaymentRequestDialogView* dialog, 40 PaymentRequestDialogView* dialog,
40 base::OnceClosure on_edited, 41 base::OnceClosure on_edited,
41 base::OnceCallback<void(const autofill::CreditCard&)> on_added, 42 base::OnceCallback<void(const autofill::CreditCard&)> on_added,
42 autofill::CreditCard* credit_card); 43 autofill::CreditCard* credit_card);
43 ~CreditCardEditorViewController() override; 44 ~CreditCardEditorViewController() override;
44 45
45 // EditorViewController: 46 // EditorViewController:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // If non-nullptr, a pointer to an object to be edited. Must outlive this 97 // If non-nullptr, a pointer to an object to be edited. Must outlive this
97 // controller. 98 // controller.
98 autofill::CreditCard* credit_card_to_edit_; 99 autofill::CreditCard* credit_card_to_edit_;
99 100
100 DISALLOW_COPY_AND_ASSIGN(CreditCardEditorViewController); 101 DISALLOW_COPY_AND_ASSIGN(CreditCardEditorViewController);
101 }; 102 };
102 103
103 } // namespace payments 104 } // namespace payments
104 105
105 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H _ 106 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H _
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698