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

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

Issue 2779283002: [Web Payments] Implement the CVC Unmask dialog. (Closed)
Patch Set: BUILD 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 side-by-side diff with in-line comments
Download patch
Index: components/payments/content/payment_request_state.h
diff --git a/components/payments/content/payment_request_state.h b/components/payments/content/payment_request_state.h
index 19f9979b59f17dd1acc49c2012e9e0831efb7761..f1d067bbeac2251eea2664d19b9d3f572a02b0c1 100644
--- a/components/payments/content/payment_request_state.h
+++ b/components/payments/content/payment_request_state.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/observer_list.h"
#include "components/payments/content/payment_request.mojom.h"
+#include "components/payments/core/autofill_payment_instrument.h"
#include "components/payments/core/payment_instrument.h"
namespace autofill {
@@ -20,6 +21,7 @@ class PersonalDataManager;
namespace payments {
+class PaymentRequestDelegate;
class PaymentRequestSpec;
// Keeps track of the information currently selected by the user and whether the
@@ -60,7 +62,8 @@ class PaymentRequestState : public PaymentInstrument::Delegate {
PaymentRequestState(PaymentRequestSpec* spec,
Delegate* delegate,
const std::string& app_locale,
- autofill::PersonalDataManager* personal_data_manager);
+ autofill::PersonalDataManager* personal_data_manager,
+ PaymentRequestDelegate* payment_request_delegate);
~PaymentRequestState() override;
// Returns whether the user has at least one instrument that satisfies the
@@ -120,6 +123,8 @@ class PaymentRequestState : public PaymentInstrument::Delegate {
const std::string& GetApplicationLocale();
autofill::PersonalDataManager* GetPersonalDataManager();
+ Delegate* delegate() { return delegate_; }
+
private:
// Fetches the Autofill Profiles for this user from the PersonalDataManager,
// and stores copies of them, owned by this PaymentRequestState, in
@@ -167,6 +172,8 @@ class PaymentRequestState : public PaymentInstrument::Delegate {
// Credit cards are directly owned by the instruments in this list.
std::vector<std::unique_ptr<PaymentInstrument>> available_instruments_;
+ PaymentRequestDelegate* payment_request_delegate_;
+
base::ObserverList<Observer> observers_;
DISALLOW_COPY_AND_ASSIGN(PaymentRequestState);
« no previous file with comments | « components/payments/content/payment_request_dialog.h ('k') | components/payments/content/payment_request_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698