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

Side by Side Diff: chrome/browser/ui/views/payments/payment_method_view_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 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 CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ui/views/payments/payment_request_item_list.h" 9 #include "chrome/browser/ui/views/payments/payment_request_item_list.h"
10 #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h" 10 #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h"
11 11
12 namespace payments { 12 namespace payments {
13 13
14 class PaymentRequest; 14 class PaymentRequestSpec;
15 class PaymentRequestState;
15 class PaymentRequestDialogView; 16 class PaymentRequestDialogView;
16 17
17 // The PaymentRequestSheetController subtype for the Payment Method screen of 18 // The PaymentRequestSheetController subtype for the Payment Method screen of
18 // the Payment Request flow. 19 // the Payment Request flow.
19 class PaymentMethodViewController : public PaymentRequestSheetController { 20 class PaymentMethodViewController : public PaymentRequestSheetController {
20 public: 21 public:
21 // Does not take ownership of the arguments, which should outlive this object. 22 // Does not take ownership of the arguments, which should outlive this object.
22 PaymentMethodViewController(PaymentRequest* request, 23 PaymentMethodViewController(PaymentRequestSpec* spec,
24 PaymentRequestState* state,
23 PaymentRequestDialogView* dialog); 25 PaymentRequestDialogView* dialog);
24 ~PaymentMethodViewController() override; 26 ~PaymentMethodViewController() override;
25 27
26 // PaymentRequestSheetController: 28 // PaymentRequestSheetController:
27 std::unique_ptr<views::View> CreateView() override; 29 std::unique_ptr<views::View> CreateView() override;
28 30
29 private: 31 private:
30 // PaymentRequestSheetController: 32 // PaymentRequestSheetController:
31 std::unique_ptr<views::View> CreateExtraFooterView() override; 33 std::unique_ptr<views::View> CreateExtraFooterView() override;
32 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 34 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
33 35
34 PaymentRequestItemList payment_method_list_; 36 PaymentRequestItemList payment_method_list_;
35 37
36 DISALLOW_COPY_AND_ASSIGN(PaymentMethodViewController); 38 DISALLOW_COPY_AND_ASSIGN(PaymentMethodViewController);
37 }; 39 };
38 40
39 } // namespace payments 41 } // namespace payments
40 42
41 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_ 43 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698