OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_PROVIDER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_PROVIDER_IMPL_H_ |
6 #define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_PROVIDER_IMPL_H_ | 6 #define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_PROVIDER_IMPL_H_ |
7 | 7 |
8 #include <string> | |
9 | |
10 #include "base/macros.h" | 8 #include "base/macros.h" |
11 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
12 #include "components/payments/content/payment_app.mojom.h" | |
13 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
14 #include "content/public/browser/payment_app_provider.h" | 11 #include "content/public/browser/payment_app_provider.h" |
15 | 12 |
16 namespace content { | 13 namespace content { |
17 | 14 |
18 class BrowserContext; | |
19 | |
20 class CONTENT_EXPORT PaymentAppProviderImpl : public PaymentAppProvider { | 15 class CONTENT_EXPORT PaymentAppProviderImpl : public PaymentAppProvider { |
21 public: | 16 public: |
22 static PaymentAppProviderImpl* GetInstance(); | 17 static PaymentAppProviderImpl* GetInstance(); |
23 | 18 |
24 // PaymentAppProvider implementation: | 19 // PaymentAppProvider implementation: |
25 // Should be accessed only on the UI thread. | 20 // Should be accessed only on the UI thread. |
26 void GetAllManifests(BrowserContext* browser_context, | 21 void GetAllManifests(BrowserContext* browser_context, |
27 const GetAllManifestsCallback& callback) override; | 22 const GetAllManifestsCallback& callback) override; |
28 void InvokePaymentApp( | 23 void InvokePaymentApp(BrowserContext* browser_context, |
29 BrowserContext* browser_context, | 24 int64_t registration_id, |
30 int64_t registration_id, | 25 payments::mojom::PaymentAppRequestPtr app_request, |
31 payments::mojom::PaymentAppRequestPtr app_request) override; | 26 const InvokePaymentAppCallback& callback) override; |
32 | 27 |
33 private: | 28 private: |
34 PaymentAppProviderImpl(); | 29 PaymentAppProviderImpl(); |
35 ~PaymentAppProviderImpl() override; | 30 ~PaymentAppProviderImpl() override; |
36 | 31 |
37 friend struct base::DefaultSingletonTraits<PaymentAppProviderImpl>; | 32 friend struct base::DefaultSingletonTraits<PaymentAppProviderImpl>; |
38 | 33 |
39 DISALLOW_COPY_AND_ASSIGN(PaymentAppProviderImpl); | 34 DISALLOW_COPY_AND_ASSIGN(PaymentAppProviderImpl); |
40 }; | 35 }; |
41 | 36 |
42 } // namespace content | 37 } // namespace content |
43 | 38 |
44 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_PROVIDER_IMPL_H_ | 39 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_PROVIDER_IMPL_H_ |
OLD | NEW |