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

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

Issue 2805263003: [Payments] Selecting incomplete items will open editors (Closed)
Patch Set: Initial 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PAYMENT_REQUEST_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/browser/ui/views/payments/view_stack.h" 12 #include "chrome/browser/ui/views/payments/view_stack.h"
13 #include "components/payments/content/payment_request_dialog.h" 13 #include "components/payments/content/payment_request_dialog.h"
14 #include "components/payments/content/payment_request_spec.h" 14 #include "components/payments/content/payment_request_spec.h"
15 #include "ui/views/window/dialog_delegate.h" 15 #include "ui/views/window/dialog_delegate.h"
16 16
17 namespace autofill {
18 class AutofillProfile;
19 class CreditCard;
20 } // namespace autofill
21
17 namespace payments { 22 namespace payments {
18 23
19 class PaymentRequest; 24 class PaymentRequest;
20 class PaymentRequestSheetController; 25 class PaymentRequestSheetController;
21 26
22 // Maps views owned by PaymentRequestDialogView::view_stack_ to their 27 // Maps views owned by PaymentRequestDialogView::view_stack_ to their
23 // controller. PaymentRequestDialogView is responsible for listening for those 28 // controller. PaymentRequestDialogView is responsible for listening for those
24 // views being removed from the hierarchy and delete the associated controllers. 29 // views being removed from the hierarchy and delete the associated controllers.
25 using ControllerMap = 30 using ControllerMap =
26 std::map<views::View*, std::unique_ptr<PaymentRequestSheetController>>; 31 std::map<views::View*, std::unique_ptr<PaymentRequestSheetController>>;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 void OnInvalidSpecProvided() override {} 88 void OnInvalidSpecProvided() override {}
84 void OnSpecUpdated() override; 89 void OnSpecUpdated() override;
85 90
86 void Pay(); 91 void Pay();
87 void GoBack(); 92 void GoBack();
88 void ShowContactProfileSheet(); 93 void ShowContactProfileSheet();
89 void ShowOrderSummary(); 94 void ShowOrderSummary();
90 void ShowShippingProfileSheet(); 95 void ShowShippingProfileSheet();
91 void ShowPaymentMethodSheet(); 96 void ShowPaymentMethodSheet();
92 void ShowShippingOptionSheet(); 97 void ShowShippingOptionSheet();
93 void ShowCreditCardEditor(); 98 // |credit_card| is the card to be edited, or nullptr for adding a card.
94 void ShowShippingAddressEditor(); 99 void ShowCreditCardEditor(autofill::CreditCard* credit_card = nullptr);
100 // |profile| is the address to be edited, or nullptr for adding an address.
101 void ShowShippingAddressEditor(autofill::AutofillProfile* profile = nullptr);
95 void EditorViewUpdated(); 102 void EditorViewUpdated();
96 103
97 void ShowCvcUnmaskPrompt( 104 void ShowCvcUnmaskPrompt(
98 const autofill::CreditCard& credit_card, 105 const autofill::CreditCard& credit_card,
99 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> 106 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate>
100 result_delegate, 107 result_delegate,
101 content::WebContents* web_contents) override; 108 content::WebContents* web_contents) override;
102 109
103 ViewStack* view_stack_for_testing() { return &view_stack_; } 110 ViewStack* view_stack_for_testing() { return &view_stack_; }
104 111
(...skipping 19 matching lines...) Expand all
124 // Used when the dialog is being closed to avoid re-entrancy into the 131 // Used when the dialog is being closed to avoid re-entrancy into the
125 // controller_map_. 132 // controller_map_.
126 bool being_closed_; 133 bool being_closed_;
127 134
128 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView); 135 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView);
129 }; 136 };
130 137
131 } // namespace payments 138 } // namespace payments
132 139
133 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ 140 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698