Index: chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
diff --git a/chrome/browser/ui/views/payments/payment_request_sheet_controller.h b/chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..be9adfaeec17b0a2c697d18528b1fe6df9c340a8 |
--- /dev/null |
+++ b/chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
@@ -0,0 +1,47 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ |
+#define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ |
+ |
+#include <memory> |
+ |
+#include "base/macros.h" |
+ |
+namespace views { |
+class View; |
+} |
+ |
+namespace payments { |
+ |
+class PaymentRequestDialog; |
+class PaymentRequestImpl; |
+ |
+// The base class for objects responsible for the creation and event handling in |
+// views shown in the PaymentRequestDialog. |
+class PaymentRequestSheetController { |
+ public: |
+ 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.
|
+ PaymentRequestDialog* dialog) |
+ : impl_(impl), |
+ dialog_(dialog) {} |
+ virtual ~PaymentRequestSheetController() {} |
+ |
+ virtual std::unique_ptr<views::View> CreateView() = 0; |
+ |
+ // 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.
|
+ PaymentRequestImpl* impl() { return impl_; } |
+ // 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.
|
+ PaymentRequestDialog* dialog() { return dialog_; } |
+ |
+ private: |
+ 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.
|
+ PaymentRequestDialog* dialog_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PaymentRequestSheetController); |
+}; |
+ |
+} // namespace payments |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ |