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

Unified Diff: chrome/browser/ui/views/payments/payment_request_sheet_controller.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_sheet_controller.h
diff --git a/chrome/browser/ui/views/payments/payment_request_sheet_controller.h b/chrome/browser/ui/views/payments/payment_request_sheet_controller.h
index d7229921361109b1d2738fa3939d80387c439c06..1024d2bfef22c02e40c2e08795e2351472f1c048 100644
--- a/chrome/browser/ui/views/payments/payment_request_sheet_controller.h
+++ b/chrome/browser/ui/views/payments/payment_request_sheet_controller.h
@@ -18,7 +18,8 @@ class View;
namespace payments {
class PaymentRequestDialogView;
-class PaymentRequest;
+class PaymentRequestSpec;
+class PaymentRequestState;
// The base class for objects responsible for the creation and event handling in
// views shown in the PaymentRequestDialog.
@@ -26,17 +27,17 @@ class PaymentRequestSheetController : public views::VectorIconButtonDelegate {
public:
// Objects of this class are owned by |dialog|, so it's a non-owned pointer
// that should be valid throughout this object's lifetime.
- // |request| is also not owned by this and is guaranteed to outlive dialog.
- // Neither |request| or |dialog| should be null.
- PaymentRequestSheetController(PaymentRequest* request,
+ // |state| and |spec| are also not owned by this and are guaranteed to outlive
+ // dialog. Neither |state|, |spec| or |dialog| should be null.
+ PaymentRequestSheetController(PaymentRequestSpec* spec,
+ PaymentRequestState* state,
PaymentRequestDialogView* dialog);
~PaymentRequestSheetController() override {}
virtual std::unique_ptr<views::View> CreateView() = 0;
- // The PaymentRequest object associated with this instance of the dialog.
- // Caller should not take ownership of the result.
- PaymentRequest* request() { return request_; }
+ PaymentRequestSpec* spec() { return spec_; }
+ PaymentRequestState* state() { return state_; }
// The dialog that contains and owns this object.
// Caller should not take ownership of the result.
@@ -91,9 +92,9 @@ class PaymentRequestSheetController : public views::VectorIconButtonDelegate {
std::unique_ptr<views::View> CreateFooterView();
private:
- // Not owned. Will outlive this.
- PaymentRequest* request_;
- // Not owned. Will outlive this.
+ // All these are not owned. Will outlive this.
+ PaymentRequestSpec* spec_;
+ PaymentRequestState* state_;
PaymentRequestDialogView* dialog_;
DISALLOW_COPY_AND_ASSIGN(PaymentRequestSheetController);

Powered by Google App Engine
This is Rietveld 408576698