Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: chrome/browser/ui/views/payments/payment_request_dialog.h

Issue 2529733002: [WebPayments] Move views-specific code to c/b/ui/views/ (Closed)
Patch Set: Add comment about PaymentRequestImpl* ownership/lifetime. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_
7
8 #include "ui/views/controls/label.h"
9 #include "ui/views/window/dialog_delegate.h"
10
11 namespace payments {
12
13 class PaymentRequestImpl;
14
15 class PaymentRequestDialog : public views::DialogDelegateView {
sky 2016/12/05 21:49:46 Add description.
anthonyvd 2016/12/05 22:11:27 Done.
16 public:
17 explicit PaymentRequestDialog(PaymentRequestImpl* impl);
18 ~PaymentRequestDialog() override;
19
20 // views::WidgetDelegate:
21 ui::ModalType GetModalType() const override;
22
23 // views::View:
24 gfx::Size GetPreferredSize() const override;
25
26 // views::DialogDelegate:
27 bool Cancel() override;
28
29 private:
30 // Non-owned reference to the PaymentRequestImpl that initiated this dialog.
31 // Since the PaymentRequestImpl object always outlives this one, the pointer
32 // should always be valid even though there is no direct ownership
33 // relationship between the two.
34 PaymentRequestImpl* impl_;
35 std::unique_ptr<views::Label> label_;
36
37 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialog);
38 };
39
40 } // namespace payments
41
42 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698