OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "base/macros.h" | |
11 | |
12 namespace views { | |
13 class View; | |
14 } | |
15 | |
16 namespace payments { | |
17 | |
18 class PaymentRequestDialog; | |
19 class PaymentRequestImpl; | |
20 | |
21 // The base class for objects responsible for the creation and event handling in | |
22 // views shown in the PaymentRequestDialog. | |
23 class PaymentRequestSheetController { | |
24 public: | |
25 PaymentRequestSheetController(PaymentRequestImpl* impl, | |
26 PaymentRequestDialog* dialog) | |
27 : impl_(impl), | |
28 dialog_(dialog) {} | |
29 virtual ~PaymentRequestSheetController() {} | |
30 | |
31 virtual std::unique_ptr<views::View> CreateView() = 0; | |
sky
2016/12/15 16:49:44
Technically you don't need CreateView() defined in
| |
32 | |
33 // The PaymentRequestImpl object associated with this instance of the dialog. | |
34 PaymentRequestImpl* impl() { return impl_; } | |
35 // The dialog that contains and owns this object. | |
36 PaymentRequestDialog* dialog() { return dialog_; } | |
37 | |
38 private: | |
39 PaymentRequestImpl* impl_; | |
40 PaymentRequestDialog* dialog_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(PaymentRequestSheetController); | |
43 }; | |
44 | |
45 } // namespace payments | |
46 | |
47 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ | |
OLD | NEW |