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..399f17a6565a38812401daf34aaeb8c07c1df874 |
--- /dev/null |
+++ b/chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
@@ -0,0 +1,43 @@ |
+// 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 payments { |
+ |
+class PaymentRequestDialog; |
+class PaymentRequestImpl; |
+ |
+// The base class for objects responsible for the creation and event handling in |
+// views shown in the PaymentRequestDialog. Subtypes should provide a |
+// CreateView() static functions that returns the view they control. See |
+// PaymentSheetViewController for an example. |
+class PaymentRequestSheetController { |
+ public: |
+ PaymentRequestSheetController(PaymentRequestImpl* impl, |
+ PaymentRequestDialog* dialog) |
+ : impl_(impl), |
+ dialog_(dialog) {} |
+ virtual ~PaymentRequestSheetController() {} |
+ |
+ // The PaymentRequestImpl object associated with this instance of the dialog. |
+ PaymentRequestImpl* impl() { return impl_; } |
+ // The dialog that contains and owns this object. |
+ PaymentRequestDialog* dialog() { return dialog_; } |
+ |
+ private: |
+ PaymentRequestImpl* impl_; |
+ PaymentRequestDialog* dialog_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PaymentRequestSheetController); |
+}; |
+ |
+} // namespace payments |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ |