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

Side by Side Diff: chrome/browser/ui/views/payments/payment_sheet_view_controller.h

Issue 2815723002: [Web Payments] Add Spinners and timeout while waiting for UpdateWith (Closed)
Patch Set: Address comments. 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_sheet_view_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SHEET_VIEW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_VIEW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_VIEW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_VIEW_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 12 matching lines...) Expand all
23 public PaymentRequestState::Observer { 23 public PaymentRequestState::Observer {
24 public: 24 public:
25 // Does not take ownership of the arguments, which should outlive this object. 25 // Does not take ownership of the arguments, which should outlive this object.
26 PaymentSheetViewController(PaymentRequestSpec* spec, 26 PaymentSheetViewController(PaymentRequestSpec* spec,
27 PaymentRequestState* state, 27 PaymentRequestState* state,
28 PaymentRequestDialogView* dialog); 28 PaymentRequestDialogView* dialog);
29 ~PaymentSheetViewController() override; 29 ~PaymentSheetViewController() override;
30 30
31 // PaymentRequestSpec::Observer: 31 // PaymentRequestSpec::Observer:
32 void OnInvalidSpecProvided() override {} 32 void OnInvalidSpecProvided() override {}
33 void OnStartUpdating(PaymentRequestSpec::UpdateReason reason) override;
33 void OnSpecUpdated() override; 34 void OnSpecUpdated() override;
34 35
35 // PaymentRequestState::Observer: 36 // PaymentRequestState::Observer:
36 void OnSelectedInformationChanged() override; 37 void OnSelectedInformationChanged() override;
37 38
38 private: 39 private:
39 // PaymentRequestSheetController: 40 // PaymentRequestSheetController:
40 std::unique_ptr<views::Button> CreatePrimaryButton() override; 41 std::unique_ptr<views::Button> CreatePrimaryButton() override;
41 bool ShouldShowHeaderBackArrow() override; 42 bool ShouldShowHeaderBackArrow() override;
42 base::string16 GetSheetTitle() override; 43 base::string16 GetSheetTitle() override;
43 void FillContentView(views::View* content_view) override; 44 void FillContentView(views::View* content_view) override;
44 std::unique_ptr<views::View> CreateExtraFooterView() override; 45 std::unique_ptr<views::View> CreateExtraFooterView() override;
45 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 46 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
46 47
47 void UpdatePayButtonState(bool enabled); 48 void UpdatePayButtonState(bool enabled);
48 49
49 std::unique_ptr<views::View> CreateShippingSectionContent(); 50 std::unique_ptr<views::View> CreateShippingSectionContent();
50 std::unique_ptr<views::Button> CreateShippingRow(); 51 std::unique_ptr<views::Button> CreateShippingRow();
51 std::unique_ptr<views::Button> CreatePaymentSheetSummaryRow(); 52 std::unique_ptr<views::Button> CreatePaymentSheetSummaryRow();
52 std::unique_ptr<views::Button> CreatePaymentMethodRow(); 53 std::unique_ptr<views::Button> CreatePaymentMethodRow();
53 std::unique_ptr<views::View> CreateContactInfoSectionContent(); 54 std::unique_ptr<views::View> CreateContactInfoSectionContent();
54 std::unique_ptr<views::Button> CreateContactInfoRow(); 55 std::unique_ptr<views::Button> CreateContactInfoRow();
55 std::unique_ptr<views::Button> CreateShippingOptionRow(); 56 std::unique_ptr<views::Button> CreateShippingOptionRow();
56 57
57 views::Button* pay_button_; 58 views::Button* pay_button_;
58 59
59 const int widest_name_column_view_width_; 60 const int widest_name_column_view_width_;
61 PaymentRequestSpec::UpdateReason current_update_reason_;
60 62
61 DISALLOW_COPY_AND_ASSIGN(PaymentSheetViewController); 63 DISALLOW_COPY_AND_ASSIGN(PaymentSheetViewController);
62 }; 64 };
63 65
64 } // namespace payments 66 } // namespace payments
65 67
66 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_VIEW_CONTROLLER_H_ 68 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_VIEW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_sheet_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698