| 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_SHEET_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // +---------------------------+ | 111 // +---------------------------+ |
| 112 // | HEADER VIEW | | 112 // | HEADER VIEW | |
| 113 // +---------------------------+ | 113 // +---------------------------+ |
| 114 // | CONTENT | | 114 // | CONTENT | |
| 115 // | VIEW | | 115 // | VIEW | |
| 116 // +---------------------------+ | 116 // +---------------------------+ |
| 117 // | EXTRA VIEW | PAY | CANCEL | <-- footer | 117 // | EXTRA VIEW | PAY | CANCEL | <-- footer |
| 118 // +---------------------------+ | 118 // +---------------------------+ |
| 119 std::unique_ptr<views::View> CreatePaymentView(); | 119 std::unique_ptr<views::View> CreatePaymentView(); |
| 120 | 120 |
| 121 // Called when the Enter accelerator is pressed. Perform the action associated |
| 122 // with the primary button and returns true if it's enabled, returns false |
| 123 // otherwise. |
| 124 bool PerformPrimaryButtonAction(); |
| 125 |
| 121 // All these are not owned. Will outlive this. | 126 // All these are not owned. Will outlive this. |
| 122 PaymentRequestSpec* spec_; | 127 PaymentRequestSpec* spec_; |
| 123 PaymentRequestState* state_; | 128 PaymentRequestState* state_; |
| 124 PaymentRequestDialogView* dialog_; | 129 PaymentRequestDialogView* dialog_; |
| 125 | 130 |
| 126 // This view is owned by its encompassing ScrollView. | 131 // This view is owned by its encompassing ScrollView. |
| 127 views::View* pane_; | 132 views::View* pane_; |
| 128 views::View* content_view_; | 133 views::View* content_view_; |
| 129 | 134 |
| 130 // Hold on to the ScrollView because it must be explicitly laid out in some | 135 // Hold on to the ScrollView because it must be explicitly laid out in some |
| 131 // cases. | 136 // cases. |
| 132 std::unique_ptr<views::ScrollView> scroll_; | 137 std::unique_ptr<views::ScrollView> scroll_; |
| 133 | 138 |
| 134 // Hold on to the primary and secondary buttons to use them as initial focus | 139 // Hold on to the primary and secondary buttons to use them as initial focus |
| 135 // targets when subclasses don't want to focus anything else. | 140 // targets when subclasses don't want to focus anything else. |
| 136 std::unique_ptr<views::Button> primary_button_; | 141 std::unique_ptr<views::Button> primary_button_; |
| 137 std::unique_ptr<views::Button> secondary_button_; | 142 std::unique_ptr<views::Button> secondary_button_; |
| 138 | 143 |
| 139 DISALLOW_COPY_AND_ASSIGN(PaymentRequestSheetController); | 144 DISALLOW_COPY_AND_ASSIGN(PaymentRequestSheetController); |
| 140 }; | 145 }; |
| 141 | 146 |
| 142 } // namespace payments | 147 } // namespace payments |
| 143 | 148 |
| 144 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ | 149 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ |
| OLD | NEW |