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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentManager.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/PaymentManager.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentManager.cpp b/third_party/WebKit/Source/modules/payments/PaymentManager.cpp
index 9e94993684e6ec59ccc5d103855e25ca102b5838..b477ad0f20aa63699babd5934aa7b866868cacd7 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentManager.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentManager.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"
@@ -128,12 +129,19 @@ ScriptPromise PaymentManager::getManifest(ScriptState* scriptState) {
return promise;
}
+PaymentInstruments* PaymentManager::instruments() {
+ if (!m_instruments)
+ m_instruments = new PaymentInstruments();
+ return m_instruments;
+}
+
DEFINE_TRACE(PaymentManager) {
visitor->trace(m_registration);
+ visitor->trace(m_instruments);
}
PaymentManager::PaymentManager(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