Chromium Code Reviews| 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, |
| + PaymentRequestDialog* dialog) |
| + : impl_(impl), |
| + dialog_(dialog) {} |
| + virtual ~PaymentRequestSheetController() {} |
| + |
| + virtual std::unique_ptr<views::View> CreateView() = 0; |
|
sky
2016/12/15 16:49:44
Technically you don't need CreateView() defined in
|
| + |
| + // 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_ |