| OLD | NEW |
| 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_REQUEST_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 class PaymentRequestDialog : public views::DialogDelegateView { | 29 class PaymentRequestDialog : public views::DialogDelegateView { |
| 30 public: | 30 public: |
| 31 explicit PaymentRequestDialog(PaymentRequestImpl* impl); | 31 explicit PaymentRequestDialog(PaymentRequestImpl* impl); |
| 32 ~PaymentRequestDialog() override; | 32 ~PaymentRequestDialog() override; |
| 33 | 33 |
| 34 // views::WidgetDelegate | 34 // views::WidgetDelegate |
| 35 ui::ModalType GetModalType() const override; | 35 ui::ModalType GetModalType() const override; |
| 36 | 36 |
| 37 // views::DialogDelegate | 37 // views::DialogDelegate |
| 38 bool Cancel() override; | 38 bool Cancel() override; |
| 39 bool ShouldShowCloseButton() const override; |
| 40 int GetDialogButtons() const override; |
| 39 | 41 |
| 40 void GoBack(); | 42 void GoBack(); |
| 41 void ShowOrderSummary(); | 43 void ShowOrderSummary(); |
| 44 void CloseDialog(); |
| 42 | 45 |
| 43 private: | 46 private: |
| 44 void ShowInitialPaymentSheet(); | 47 void ShowInitialPaymentSheet(); |
| 45 | 48 |
| 46 // views::View | 49 // views::View |
| 47 gfx::Size GetPreferredSize() const override; | 50 gfx::Size GetPreferredSize() const override; |
| 48 void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details) | 51 void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details) |
| 49 override; | 52 override; |
| 50 | 53 |
| 51 // Non-owned reference to the PaymentRequestImpl that initiated this dialog. | 54 // Non-owned reference to the PaymentRequestImpl that initiated this dialog. |
| 52 // Since the PaymentRequestImpl object always outlives this one, the pointer | 55 // Since the PaymentRequestImpl object always outlives this one, the pointer |
| 53 // should always be valid even though there is no direct ownership | 56 // should always be valid even though there is no direct ownership |
| 54 // relationship between the two. | 57 // relationship between the two. |
| 55 PaymentRequestImpl* impl_; | 58 PaymentRequestImpl* impl_; |
| 56 ControllerMap controller_map_; | 59 ControllerMap controller_map_; |
| 57 ViewStack view_stack_; | 60 ViewStack view_stack_; |
| 58 | 61 |
| 59 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialog); | 62 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialog); |
| 60 }; | 63 }; |
| 61 | 64 |
| 62 } // namespace payments | 65 } // namespace payments |
| 63 | 66 |
| 64 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ | 67 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |
| OLD | NEW |