Chromium Code Reviews| Index: chrome/browser/ui/views/payments/payment_request_dialog.h |
| diff --git a/chrome/browser/ui/views/payments/payment_request_dialog.h b/chrome/browser/ui/views/payments/payment_request_dialog.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..54aaf71c26a2f33b6c7898af4053a0c725cfc5b0 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/payments/payment_request_dialog.h |
| @@ -0,0 +1,42 @@ |
| +// 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_DIALOG_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |
| + |
| +#include "ui/views/controls/label.h" |
| +#include "ui/views/window/dialog_delegate.h" |
| + |
| +namespace payments { |
| + |
| +class PaymentRequestImpl; |
| + |
| +class PaymentRequestDialog : public views::DialogDelegateView { |
|
sky
2016/12/05 21:49:46
Add description.
anthonyvd
2016/12/05 22:11:27
Done.
|
| + public: |
| + explicit PaymentRequestDialog(PaymentRequestImpl* impl); |
| + ~PaymentRequestDialog() override; |
| + |
| + // views::WidgetDelegate: |
| + ui::ModalType GetModalType() const override; |
| + |
| + // views::View: |
| + gfx::Size GetPreferredSize() const override; |
| + |
| + // views::DialogDelegate: |
| + bool Cancel() override; |
| + |
| + private: |
| + // Non-owned reference to the PaymentRequestImpl that initiated this dialog. |
| + // Since the PaymentRequestImpl object always outlives this one, the pointer |
| + // should always be valid even though there is no direct ownership |
| + // relationship between the two. |
| + PaymentRequestImpl* impl_; |
| + std::unique_ptr<views::Label> label_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialog); |
| +}; |
| + |
| +} // namespace payments |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |