| 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, | |
| 22 const GetAllManifestsCallback& callback) override; | |
| 23 void GetAllPaymentApps(BrowserContext* browser_context, | 21 void GetAllPaymentApps(BrowserContext* browser_context, |
| 24 GetAllPaymentAppsCallback callback) override; | 22 GetAllPaymentAppsCallback callback) override; |
| 25 void InvokePaymentApp(BrowserContext* browser_context, | 23 void InvokePaymentApp(BrowserContext* browser_context, |
| 26 int64_t registration_id, | 24 int64_t registration_id, |
| 27 payments::mojom::PaymentAppRequestPtr app_request, | 25 payments::mojom::PaymentAppRequestPtr app_request, |
| 28 const InvokePaymentAppCallback& callback) override; | 26 const InvokePaymentAppCallback& callback) override; |
| 29 | 27 |
| 30 private: | 28 private: |
| 31 PaymentAppProviderImpl(); | 29 PaymentAppProviderImpl(); |
| 32 ~PaymentAppProviderImpl() override; | 30 ~PaymentAppProviderImpl() override; |
| 33 | 31 |
| 34 friend struct base::DefaultSingletonTraits<PaymentAppProviderImpl>; | 32 friend struct base::DefaultSingletonTraits<PaymentAppProviderImpl>; |
| 35 | 33 |
| 36 DISALLOW_COPY_AND_ASSIGN(PaymentAppProviderImpl); | 34 DISALLOW_COPY_AND_ASSIGN(PaymentAppProviderImpl); |
| 37 }; | 35 }; |
| 38 | 36 |
| 39 } // namespace content | 37 } // namespace content |
| 40 | 38 |
| 41 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_PROVIDER_IMPL_H_ | 39 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_PROVIDER_IMPL_H_ |
| OLD | NEW |