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

Side by Side Diff: content/browser/payments/payment_app_manager.h

Issue 2476343002: PaymentApp: Initial implementation for PaymentAppManager.setManifest(). (Closed)
Patch Set: PaymentApp: Initial implementation for PaymentAppManager.setManifest(). Created 4 years, 1 month 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 CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_MANAGER_H_
6 #define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_MANAGER_H_
7
8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "components/payments/payment_app.mojom.h"
11 #include "content/common/content_export.h"
12 #include "mojo/public/cpp/bindings/binding.h"
13
14 namespace content {
15
16 class PaymentAppContext;
17
18 class CONTENT_EXPORT PaymentAppManager
19 : public NON_EXPORTED_BASE(payments::mojom::PaymentAppManager) {
20 public:
21 PaymentAppManager(
22 PaymentAppContext* payment_app_context,
23 mojo::InterfaceRequest<payments::mojom::PaymentAppManager> request);
24
25 ~PaymentAppManager() override;
26
27 private:
28 // payments::mojom::PaymentAppManager methods:
29 void SetManifest(const std::string& scope,
30 payments::mojom::PaymentAppManifestPtr manifest,
31 const SetManifestCallback& callback) override;
32
33 // Called when an error is detected on binding_.
34 void OnConnectionError();
35
36 // payment_app_context_ owns this.
37 PaymentAppContext* payment_app_context_;
38
39 mojo::Binding<payments::mojom::PaymentAppManager> binding_;
40
41 base::WeakPtrFactory<PaymentAppManager> weak_ptr_factory_;
42
43 DISALLOW_COPY_AND_ASSIGN(PaymentAppManager);
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698