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