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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "content/public/browser/payment_app_provider.h" | 11 #include "content/public/browser/payment_app_provider.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class CONTENT_EXPORT PaymentAppProviderImpl : public PaymentAppProvider { | 15 class CONTENT_EXPORT PaymentAppProviderImpl : public PaymentAppProvider { |
16 public: | 16 public: |
17 static PaymentAppProviderImpl* GetInstance(); | 17 static PaymentAppProviderImpl* GetInstance(); |
18 | 18 |
19 // PaymentAppProvider implementation: | 19 // PaymentAppProvider implementation: |
20 // Should be accessed only on the UI thread. | 20 // Should be accessed only on the UI thread. |
21 void GetAllManifests(BrowserContext* browser_context, | 21 void GetAllManifests(BrowserContext* browser_context, |
22 const GetAllManifestsCallback& callback) override; | 22 const GetAllManifestsCallback& callback) override; |
| 23 void GetAllPaymentApps(BrowserContext* browser_context, |
| 24 GetAllPaymentAppsCallback callback) override; |
23 void InvokePaymentApp(BrowserContext* browser_context, | 25 void InvokePaymentApp(BrowserContext* browser_context, |
24 int64_t registration_id, | 26 int64_t registration_id, |
25 payments::mojom::PaymentAppRequestPtr app_request, | 27 payments::mojom::PaymentAppRequestPtr app_request, |
26 const InvokePaymentAppCallback& callback) override; | 28 const InvokePaymentAppCallback& callback) override; |
27 | 29 |
28 private: | 30 private: |
29 PaymentAppProviderImpl(); | 31 PaymentAppProviderImpl(); |
30 ~PaymentAppProviderImpl() override; | 32 ~PaymentAppProviderImpl() override; |
31 | 33 |
32 friend struct base::DefaultSingletonTraits<PaymentAppProviderImpl>; | 34 friend struct base::DefaultSingletonTraits<PaymentAppProviderImpl>; |
33 | 35 |
34 DISALLOW_COPY_AND_ASSIGN(PaymentAppProviderImpl); | 36 DISALLOW_COPY_AND_ASSIGN(PaymentAppProviderImpl); |
35 }; | 37 }; |
36 | 38 |
37 } // namespace content | 39 } // namespace content |
38 | 40 |
39 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_PROVIDER_IMPL_H_ | 41 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_PROVIDER_IMPL_H_ |
OLD | NEW |