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

Side by Side Diff: components/payments/content/payment_request_delegate.h

Issue 2779283002: [Web Payments] Implement the CVC Unmask dialog. (Closed)
Patch Set: Address comments 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 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 COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_
6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/payments/core/autofill_payment_instrument.h"
11
10 namespace autofill { 12 namespace autofill {
11 class PersonalDataManager; 13 class PersonalDataManager;
12 } 14 }
13 15
14 namespace payments { 16 namespace payments {
15 17
16 class PaymentRequest; 18 class PaymentRequest;
17 19
18 class PaymentRequestDelegate { 20 class PaymentRequestDelegate
21 : public AutofillPaymentInstrument::FullCardRequestDelegate {
19 public: 22 public:
20 virtual ~PaymentRequestDelegate() {} 23 ~PaymentRequestDelegate() override {}
21 24
22 // Shows the Payment Request dialog for the given |request|. 25 // Shows the Payment Request dialog for the given |request|.
23 virtual void ShowDialog(PaymentRequest* request) = 0; 26 virtual void ShowDialog(PaymentRequest* request) = 0;
24 27
25 // Closes the same dialog that was opened by this delegate. Must be safe to 28 // Closes the same dialog that was opened by this delegate. Must be safe to
26 // call when the dialog is not showing. 29 // call when the dialog is not showing.
27 virtual void CloseDialog() = 0; 30 virtual void CloseDialog() = 0;
28 31
29 // Disables the dialog and shows an error message that the transaction has 32 // Disables the dialog and shows an error message that the transaction has
30 // failed. 33 // failed.
31 virtual void ShowErrorMessage() = 0; 34 virtual void ShowErrorMessage() = 0;
32 35
33 // Gets the PersonalDataManager associated with this PaymentRequest flow. 36 // Gets the PersonalDataManager associated with this PaymentRequest flow.
34 // Cannot be null. 37 // Cannot be null.
35 virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0; 38 virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0;
36 39
37 virtual const std::string& GetApplicationLocale() const = 0; 40 virtual const std::string& GetApplicationLocale() const = 0;
38 41
39 // Returns whether the user is in Incognito mode. 42 // Returns whether the user is in Incognito mode.
40 virtual bool IsIncognito() const = 0; 43 virtual bool IsIncognito() const = 0;
41 }; 44 };
42 45
43 } // namespace payments 46 } // namespace payments
44 47
45 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ 48 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698