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

Unified Diff: chrome/browser/ui/views/payments/payment_request_item_list.h

Issue 2748133004: [Payments] View controllers no longer have access to PaymentRequest (Closed)
Patch Set: Initial 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: chrome/browser/ui/views/payments/payment_request_item_list.h
diff --git a/chrome/browser/ui/views/payments/payment_request_item_list.h b/chrome/browser/ui/views/payments/payment_request_item_list.h
index 0ac1c879b2a1128aa7413eceaa6c4115b8831d13..7a2ecc3f3eb8ecd194c0e68fc058a1106463a0e4 100644
--- a/chrome/browser/ui/views/payments/payment_request_item_list.h
+++ b/chrome/browser/ui/views/payments/payment_request_item_list.h
@@ -18,7 +18,8 @@ class View;
namespace payments {
-class PaymentRequest;
+class PaymentRequestSpec;
+class PaymentRequestState;
// A control representing a list of selectable items in the PaymentRequest
// dialog. These lists enforce that only one of their elements be selectable at
@@ -32,7 +33,10 @@ class PaymentRequestItemList {
public:
// Creates an item that will be owned by |list| with the initial state set
// to |selected|.
- Item(PaymentRequest* request, PaymentRequestItemList* list, bool selected);
+ Item(PaymentRequestSpec* spec,
+ PaymentRequestState* state,
+ PaymentRequestItemList* list,
+ bool selected);
~Item() override;
// Gets the view associated with this item. It's owned by this object so
@@ -48,9 +52,10 @@ class PaymentRequestItemList {
// Returns a pointer to the PaymentRequestItemList that owns this object.
PaymentRequestItemList* list() { return list_; }
- // Returns a pointer to the PaymentRequest object associated with this
- // instance of the UI.
- PaymentRequest* request() { return request_; }
+ // Returns a pointer to the PaymentRequestSpec/State objects associated with
+ // this instance of the UI.
+ PaymentRequestSpec* spec() { return spec_; }
+ PaymentRequestState* state() { return state_; }
protected:
// Creates and returns the view associated with this list item.
@@ -72,7 +77,8 @@ class PaymentRequestItemList {
}
std::unique_ptr<views::View> item_view_;
- PaymentRequest* request_;
+ PaymentRequestSpec* spec_;
+ PaymentRequestState* state_;
PaymentRequestItemList* list_;
bool selected_;

Powered by Google App Engine
This is Rietveld 408576698