Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: content/browser/payments/payment_app_context_impl.h

Issue 2575583003: PaymentApp: Add a interface to query all payment app manifests. (Closed)
Patch Set: PaymentApp: Add a interface to query all payment app manifests. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 69%
rename from content/browser/payments/payment_app_context.h
rename to content/browser/payments/payment_app_context_impl.h
index 3572a8b892bd74ad80210fc5872f9013950e2545..e3fd583411246f14e923d58e5ef95e23f0cd6b8e 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,18 @@
#include "base/memory/ref_counted.h"
#include "components/payments/payment_app.mojom.h"
#include "content/common/content_export.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
+ : public base::RefCountedThreadSafe<PaymentAppContextImpl>,
+ NON_EXPORTED_BASE(public PaymentAppContext) {
public:
- explicit PaymentAppContext(
+ explicit PaymentAppContextImpl(
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context);
// Shutdown must be called before deleting this. Call on the UI thread.
@@ -38,12 +40,16 @@ class CONTENT_EXPORT PaymentAppContext
ServiceWorkerContextWrapper* service_worker_context() const;
+ // PaymentAppContext implementation:
+ void GetAllManifests(const GetAllManifestsCallback& callback) override;
+
protected:
- friend class base::RefCountedThreadSafe<PaymentAppContext>;
friend class PaymentAppManagerTest;
- virtual ~PaymentAppContext();
private:
+ friend class base::RefCountedThreadSafe<PaymentAppContextImpl>;
+ ~PaymentAppContextImpl() override;
+
void CreateServiceOnIOThread(
mojo::InterfaceRequest<payments::mojom::PaymentAppManager> request);
@@ -56,9 +62,9 @@ class CONTENT_EXPORT PaymentAppContext
// ServiceHadConnectionError. Only accessed on the IO thread.
std::map<PaymentAppManager*, std::unique_ptr<PaymentAppManager>> services_;
- DISALLOW_COPY_AND_ASSIGN(PaymentAppContext);
+ DISALLOW_COPY_AND_ASSIGN(PaymentAppContextImpl);
};
} // namespace content
-#endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTEXT_H_
+#endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTEXT_IMPL_H_
« no previous file with comments | « content/browser/payments/payment_app_context.cc ('k') | content/browser/payments/payment_app_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698