Chromium Code Reviews| 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, | |
|
please use gerrit instead
2016/12/15 19:11:15
Add a comment about ownership of impl and dialog p
anthonyvd
2016/12/15 19:55:06
Done.
| |
| 26 PaymentRequestDialog* dialog) | |
| 27 : impl_(impl), | |
| 28 dialog_(dialog) {} | |
| 29 virtual ~PaymentRequestSheetController() {} | |
| 30 | |
| 31 virtual std::unique_ptr<views::View> CreateView() = 0; | |
| 32 | |
| 33 // The PaymentRequestImpl object associated with this instance of the dialog. | |
|
please use gerrit instead
2016/12/15 19:11:15
Pointer ownership comment.
anthonyvd
2016/12/15 19:55:06
Done.
| |
| 34 PaymentRequestImpl* impl() { return impl_; } | |
| 35 // The dialog that contains and owns this object. | |
|
please use gerrit instead
2016/12/15 19:11:15
Pointer ownership comment.
anthonyvd
2016/12/15 19:55:06
Done.
| |
| 36 PaymentRequestDialog* dialog() { return dialog_; } | |
| 37 | |
| 38 private: | |
| 39 PaymentRequestImpl* impl_; | |
|
please use gerrit instead
2016/12/15 19:11:15
Add comments about ownership of impl_ and dialog_
anthonyvd
2016/12/15 19:55:06
Done.
| |
| 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 |