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