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

Unified Diff: components/payments/content/payment_request.h

Issue 2733953003: [Payments] Return a basic card response (Closed)
Patch Set: addressed comments from anthony Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: components/payments/content/payment_request.h
diff --git a/components/payments/content/payment_request.h b/components/payments/content/payment_request.h
index f947000cef0e5be7ebaffa8b991887c8bf937b30..7630c4289234c0218c0db7713f146d5bdb16ee4f 100644
--- a/components/payments/content/payment_request.h
+++ b/components/payments/content/payment_request.h
@@ -13,6 +13,7 @@
#include "base/observer_list.h"
#include "components/payments/content/payment_request.mojom.h"
#include "components/payments/content/payment_request_delegate.h"
+#include "components/payments/core/payment_instrument.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace autofill {
@@ -30,7 +31,8 @@ namespace payments {
class CurrencyFormatter;
class PaymentRequestWebContentsManager;
-class PaymentRequest : payments::mojom::PaymentRequest {
+class PaymentRequest : public mojom::PaymentRequest,
+ public PaymentInstrument::Delegate {
public:
class Observer {
public:
@@ -57,8 +59,14 @@ class PaymentRequest : payments::mojom::PaymentRequest {
void Show() override;
void UpdateWith(payments::mojom::PaymentDetailsPtr details) override {}
void Abort() override;
- void Complete(payments::mojom::PaymentComplete result) override {}
- void CanMakePayment() override {}
+ void Complete(payments::mojom::PaymentComplete result) override;
+ void CanMakePayment() override;
+
+ // PaymentInstrument::Delegate:
+ void OnInstrumentDetailsReady(
+ const std::string& method_name,
+ const std::string& stringified_details) override;
+ void OnInstrumentDetailsError() override {}
// Called when the user explicitely cancelled the flow. Will send a message
// to the renderer which will indirectly destroy this object (through
@@ -184,6 +192,8 @@ class PaymentRequest : payments::mojom::PaymentRequest {
// A set of supported basic card networks.
std::vector<std::string> supported_card_networks_;
bool is_ready_to_pay_;
+ std::unique_ptr<PaymentInstrument> selected_payment_instrument_;
+ mojom::PaymentResponsePtr payment_response_;
base::ObserverList<Observer> observers_;
« no previous file with comments | « chrome/browser/ui/views/payments/payment_request_browsertest_base.cc ('k') | components/payments/content/payment_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698