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

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

Issue 2579513002: [WebPayments] Factor out sheet-specific logic in Controllers. (Closed)
Patch Set: 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_SHEET_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11
12 namespace payments {
13
14 class PaymentRequestDialog;
15 class PaymentRequestImpl;
16
17 // The base class for objects responsible for the creation and event handling in
18 // views shown in the PaymentRequestDialog. Subtypes should provide a
19 // CreateView() static functions that returns the view they control. See
20 // PaymentSheetViewController for an example.
21 class PaymentRequestSheetController {
22 public:
23 PaymentRequestSheetController(PaymentRequestImpl* impl,
24 PaymentRequestDialog* dialog)
25 : impl_(impl),
26 dialog_(dialog) {}
27 virtual ~PaymentRequestSheetController() {}
28
29 // The PaymentRequestImpl object associated with this instance of the dialog.
30 PaymentRequestImpl* impl() { return impl_; }
31 // The dialog that contains and owns this object.
32 PaymentRequestDialog* dialog() { return dialog_; }
33
34 private:
35 PaymentRequestImpl* impl_;
36 PaymentRequestDialog* dialog_;
37
38 DISALLOW_COPY_AND_ASSIGN(PaymentRequestSheetController);
39 };
40
41 } // namespace payments
42
43 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698