Index: content/browser/payments/payment_app_context_impl.h |
diff --git a/content/browser/payments/payment_app_context.h b/content/browser/payments/payment_app_context_impl.h |
similarity index 58% |
rename from content/browser/payments/payment_app_context.h |
rename to content/browser/payments/payment_app_context_impl.h |
index 3572a8b892bd74ad80210fc5872f9013950e2545..709c15fa05027cc991ac82c3d34f50256cc1bd3e 100644 |
--- a/content/browser/payments/payment_app_context.h |
+++ b/content/browser/payments/payment_app_context_impl.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTEXT_H_ |
-#define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTEXT_H_ |
+#ifndef CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTEXT_IMPL_H_ |
+#define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTEXT_IMPL_H_ |
#include <map> |
#include <memory> |
@@ -12,16 +12,19 @@ |
#include "base/memory/ref_counted.h" |
#include "components/payments/payment_app.mojom.h" |
#include "content/common/content_export.h" |
+#include "content/common/service_worker/service_worker_status_code.h" |
+#include "content/public/browser/payment_app_context.h" |
namespace content { |
class PaymentAppManager; |
class ServiceWorkerContextWrapper; |
-class CONTENT_EXPORT PaymentAppContext |
- : public base::RefCountedThreadSafe<PaymentAppContext> { |
+class CONTENT_EXPORT PaymentAppContextImpl |
+ : NON_EXPORTED_BASE(public PaymentAppContext), |
+ public base::RefCountedThreadSafe<PaymentAppContextImpl> { |
public: |
- explicit PaymentAppContext( |
+ explicit PaymentAppContextImpl( |
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context); |
// Shutdown must be called before deleting this. Call on the UI thread. |
@@ -38,10 +41,18 @@ class CONTENT_EXPORT PaymentAppContext |
ServiceWorkerContextWrapper* service_worker_context() const; |
+ void GetAllManifests(const GetAllManifestsCallback& callback) override; |
+ void GetAllManifestsOnIO(const GetAllManifestsCallback& callback); |
+ void DidGetAllManifests( |
+ const GetAllManifestsCallback& callback, |
+ const std::vector<std::pair<int64_t, std::string>>& user_data, |
+ ServiceWorkerStatusCode status); |
+ void GetAll(const GetManifestsCallback& callback); |
+ |
protected: |
- friend class base::RefCountedThreadSafe<PaymentAppContext>; |
+ friend class base::RefCountedThreadSafe<PaymentAppContextImpl>; |
friend class PaymentAppManagerTest; |
- virtual ~PaymentAppContext(); |
+ virtual ~PaymentAppContextImpl(); |
private: |
void CreateServiceOnIOThread( |
@@ -56,9 +67,11 @@ class CONTENT_EXPORT PaymentAppContext |
// ServiceHadConnectionError. Only accessed on the IO thread. |
std::map<PaymentAppManager*, std::unique_ptr<PaymentAppManager>> services_; |
- DISALLOW_COPY_AND_ASSIGN(PaymentAppContext); |
+ base::WeakPtrFactory<PaymentAppContextImpl> weak_ptr_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PaymentAppContextImpl); |
}; |
} // namespace content |
-#endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTEXT_H_ |
+#endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTEXT_IMPL_H_ |