| 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 23 matching lines...) Expand all Loading... |
| 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; | 39 bool ShouldShowCloseButton() const override; |
| 40 int GetDialogButtons() const override; | 40 int GetDialogButtons() const override; |
| 41 | 41 |
| 42 void GoBack(); | 42 void GoBack(); |
| 43 void ShowOrderSummary(); | 43 void ShowOrderSummary(); |
| 44 void ShowShippingListSheet(); |
| 44 void ShowPaymentMethodSheet(); | 45 void ShowPaymentMethodSheet(); |
| 45 void CloseDialog(); | 46 void CloseDialog(); |
| 46 | 47 |
| 47 private: | 48 private: |
| 48 void ShowInitialPaymentSheet(); | 49 void ShowInitialPaymentSheet(); |
| 49 | 50 |
| 50 // views::View | 51 // views::View |
| 51 gfx::Size GetPreferredSize() const override; | 52 gfx::Size GetPreferredSize() const override; |
| 52 void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details) | 53 void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details) |
| 53 override; | 54 override; |
| 54 | 55 |
| 55 // Non-owned reference to the PaymentRequest that initiated this dialog. Since | 56 // Non-owned reference to the PaymentRequest that initiated this dialog. Since |
| 56 // the PaymentRequest object always outlives this one, the pointer should | 57 // the PaymentRequest object always outlives this one, the pointer should |
| 57 // always be valid even though there is no direct ownership relationship | 58 // always be valid even though there is no direct ownership relationship |
| 58 // between the two. | 59 // between the two. |
| 59 PaymentRequest* request_; | 60 PaymentRequest* request_; |
| 60 ControllerMap controller_map_; | 61 ControllerMap controller_map_; |
| 61 ViewStack view_stack_; | 62 ViewStack view_stack_; |
| 62 | 63 |
| 63 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialog); | 64 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialog); |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 } // namespace payments | 67 } // namespace payments |
| 67 | 68 |
| 68 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ | 69 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |
| OLD | NEW |