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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp

Issue 2775343002: PaymentHandler: Initial implementation for PaymentInstruments. (Closed)
Patch Set: PaymentHandler: Initial implementation for PaymentInstruments. 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
Index: third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp b/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
index b9968788d8b81a55261afe9a3416b4158c862b40..8b227cb651fae924189528f5838e10e706b802ac 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
@@ -9,6 +9,7 @@
#include "core/dom/DOMException.h"
#include "modules/payments/PaymentAppManifest.h"
#include "modules/payments/PaymentAppOption.h"
+#include "modules/payments/PaymentInstruments.h"
#include "modules/serviceworkers/ServiceWorkerRegistration.h"
#include "platform/mojo/MojoHelper.h"
#include "public/platform/InterfaceProvider.h"
@@ -129,12 +130,20 @@ ScriptPromise PaymentAppManager::getManifest(ScriptState* scriptState) {
return promise;
}
+PaymentInstruments* PaymentAppManager::instruments() {
+ if (!m_instruments) {
+ m_instruments = new PaymentInstruments();
+ }
+ return m_instruments;
+}
+
DEFINE_TRACE(PaymentAppManager) {
visitor->trace(m_registration);
+ visitor->trace(m_instruments);
}
PaymentAppManager::PaymentAppManager(ServiceWorkerRegistration* registration)
- : m_registration(registration) {
+ : m_registration(registration), m_instruments(nullptr) {
DCHECK(registration);
Platform::current()->interfaceProvider()->getInterface(
mojo::MakeRequest(&m_manager));

Powered by Google App Engine
This is Rietveld 408576698