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

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

Issue 2724063002: [Payments] Add a Pay button in the Order summary screen (Closed)
Patch Set: addressed comments Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/order_summary_view_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/order_summary_view_controller.h
diff --git a/chrome/browser/ui/views/payments/order_summary_view_controller.h b/chrome/browser/ui/views/payments/order_summary_view_controller.h
index f6efe32f76dd1bb78e92e5e16a192bb87eb3fb5c..7f602386d7dfd3debd2890da11afa3f70890725e 100644
--- a/chrome/browser/ui/views/payments/order_summary_view_controller.h
+++ b/chrome/browser/ui/views/payments/order_summary_view_controller.h
@@ -7,6 +7,7 @@
#include "base/macros.h"
#include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h"
+#include "components/payments/content/payment_request.h"
namespace payments {
@@ -15,7 +16,8 @@ class PaymentRequestDialogView;
// The PaymentRequestSheetController subtype for the Order Summary screen of the
// Payment Request flow.
-class OrderSummaryViewController : public PaymentRequestSheetController {
+class OrderSummaryViewController : public PaymentRequestSheetController,
+ public PaymentRequest::Observer {
public:
// Does not take ownership of the arguments, which should outlive this object.
OrderSummaryViewController(PaymentRequest* request,
@@ -24,8 +26,16 @@ class OrderSummaryViewController : public PaymentRequestSheetController {
// PaymentRequestSheetController:
std::unique_ptr<views::View> CreateView() override;
+ std::unique_ptr<views::Button> CreatePrimaryButton() override;
+
+ // PaymentRequest::Observer:
+ void OnSelectedInformationChanged() override;
private:
+ void UpdatePayButtonState(bool enabled);
+
+ views::Button* pay_button_;
+
DISALLOW_COPY_AND_ASSIGN(OrderSummaryViewController);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/order_summary_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698