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

Unified Diff: content/public/browser/payment_app_provider.h

Issue 2718013004: PaymentApp: Implement respondWith() in PaymentRequestEvent. (content side) (Closed)
Patch Set: rebase Created 3 years, 9 months 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
« no previous file with comments | « content/public/browser/DEPS ('k') | content/renderer/service_worker/service_worker_context_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/payment_app_provider.h
diff --git a/content/public/browser/payment_app_provider.h b/content/public/browser/payment_app_provider.h
index 5a70e02f3125106b3247804e53aac9288fc9e276..646c3d18bbfcaa0cd9c2132b7975c854418bd56a 100644
--- a/content/public/browser/payment_app_provider.h
+++ b/content/public/browser/payment_app_provider.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_PUBLIC_BROWSER_PAYMENT_APP_PROVIDER_H_
#define CONTENT_PUBLIC_BROWSER_PAYMENT_APP_PROVIDER_H_
+#include <stdint.h>
#include <utility>
#include <vector>
#include "base/callback_forward.h"
+#include "components/payments/content/payment_app.mojom.h"
#include "content/common/content_export.h"
namespace content {
@@ -30,7 +32,12 @@ class CONTENT_EXPORT PaymentAppProvider {
using ManifestWithID =
std::pair<int64_t, payments::mojom::PaymentAppManifestPtr>;
using Manifests = std::vector<ManifestWithID>;
+
+ // TODO(zino): Consider to use base::OnceCallback instead of base::Callback.
+ // Please see: http://crbug.com/704193
using GetAllManifestsCallback = base::Callback<void(Manifests)>;
+ using InvokePaymentAppCallback =
+ base::Callback<void(payments::mojom::PaymentAppResponsePtr)>;
// Should be accessed only on the UI thread.
virtual void GetAllManifests(BrowserContext* browser_context,
@@ -38,7 +45,8 @@ class CONTENT_EXPORT PaymentAppProvider {
virtual void InvokePaymentApp(
BrowserContext* browser_context,
int64_t registration_id,
- payments::mojom::PaymentAppRequestPtr app_request) = 0;
+ payments::mojom::PaymentAppRequestPtr app_request,
+ const InvokePaymentAppCallback& callback) = 0;
protected:
virtual ~PaymentAppProvider() {}
« no previous file with comments | « content/public/browser/DEPS ('k') | content/renderer/service_worker/service_worker_context_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698