OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_PAYMENTS_UI_PAYMENT_REQUEST_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |
6 #define CHROME_BROWSER_PAYMENTS_UI_PAYMENT_REQUEST_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |
7 | 7 |
8 #include "components/payments/payment_request.mojom.h" | |
9 #include "ui/views/controls/label.h" | 8 #include "ui/views/controls/label.h" |
10 #include "ui/views/window/dialog_delegate.h" | 9 #include "ui/views/window/dialog_delegate.h" |
11 | 10 |
12 namespace payments { | 11 namespace payments { |
13 | 12 |
13 class PaymentRequestImpl; | |
14 | |
14 class PaymentRequestDialog : public views::DialogDelegateView { | 15 class PaymentRequestDialog : public views::DialogDelegateView { |
15 public: | 16 public: |
16 explicit PaymentRequestDialog( | 17 explicit PaymentRequestDialog(PaymentRequestImpl* impl); |
17 payments::mojom::PaymentRequestClientPtr client); | |
18 ~PaymentRequestDialog() override; | 18 ~PaymentRequestDialog() override; |
19 | 19 |
20 // views::WidgetDelegate | 20 // views::WidgetDelegate |
21 ui::ModalType GetModalType() const override; | 21 ui::ModalType GetModalType() const override; |
22 | 22 |
23 // views::View | 23 // views::View |
24 gfx::Size GetPreferredSize() const override; | 24 gfx::Size GetPreferredSize() const override; |
25 | 25 |
26 // views::DialogDelegate | 26 // views::DialogDelegate |
27 bool Cancel() override; | 27 bool Cancel() override; |
28 | 28 |
29 private: | 29 private: |
30 payments::mojom::PaymentRequestClientPtr client_; | 30 PaymentRequestImpl* impl_; // Not owned. |
please use gerrit instead
2016/11/28 15:16:41
Clearly describe the lifetime of PaymentRequestImp
anthonyvd
2016/11/28 16:12:18
Done.
Totally agree with you. Added a comment, le
| |
31 std::unique_ptr<views::Label> label_; | 31 std::unique_ptr<views::Label> label_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialog); | 33 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialog); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace payments | 36 } // namespace payments |
37 | 37 |
38 #endif // CHROME_BROWSER_PAYMENTS_UI_PAYMENT_REQUEST_DIALOG_H_ | 38 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |
OLD | NEW |