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

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

Issue 2768093006: [Payments] Desktop: Error message in the dialog. (Closed)
Patch Set: Test 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 namespace autofill { 10 namespace autofill {
11 class PersonalDataManager; 11 class PersonalDataManager;
12 } 12 }
13 13
14 namespace payments { 14 namespace payments {
15 15
16 class PaymentRequest; 16 class PaymentRequest;
17 17
18 class PaymentRequestDelegate { 18 class PaymentRequestDelegate {
19 public: 19 public:
20 virtual ~PaymentRequestDelegate() {} 20 virtual ~PaymentRequestDelegate() {}
21 21
22 // Shows the Payment Request dialog for the given |request|. 22 // Shows the Payment Request dialog for the given |request|.
23 virtual void ShowDialog(PaymentRequest* request) = 0; 23 virtual void ShowDialog(PaymentRequest* request) = 0;
24 24
25 // Closes the same dialog that was opened by this delegate. Must be safe to 25 // Closes the same dialog that was opened by this delegate. Must be safe to
26 // call when the dialog is not showing. 26 // call when the dialog is not showing.
27 virtual void CloseDialog() = 0; 27 virtual void CloseDialog() = 0;
28 28
29 // Disables the dialog and shows an error message that the transaction has
30 // failed.
31 virtual void ShowErrorMessage() = 0;
32
29 // Gets the PersonalDataManager associated with this PaymentRequest flow. 33 // Gets the PersonalDataManager associated with this PaymentRequest flow.
30 // Cannot be null. 34 // Cannot be null.
31 virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0; 35 virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0;
32 36
33 virtual const std::string& GetApplicationLocale() const = 0; 37 virtual const std::string& GetApplicationLocale() const = 0;
34 38
35 // Returns whether the user is in Incognito mode. 39 // Returns whether the user is in Incognito mode.
36 virtual bool IsIncognito() const = 0; 40 virtual bool IsIncognito() const = 0;
37 }; 41 };
38 42
39 } // namespace payments 43 } // namespace payments
40 44
41 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ 45 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/payments/content/payment_request.cc ('k') | components/payments/content/payment_request_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698