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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/PaymentRequestRespondWithObserver.h

Issue 2705293010: PaymentApp: Implement respondWith() in PaymentRequestEvent. (blink side) (Closed)
Patch Set: PaymentApp: Implement respondWith() in PaymentRequestEvent. (blink side) 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/serviceworkers/PaymentRequestRespondWithObserver.h
diff --git a/third_party/WebKit/Source/modules/serviceworkers/PaymentRequestRespondWithObserver.h b/third_party/WebKit/Source/modules/serviceworkers/PaymentRequestRespondWithObserver.h
new file mode 100644
index 0000000000000000000000000000000000000000..f224da963491200eaec93dfe5b0e2994bbc250cf
--- /dev/null
+++ b/third_party/WebKit/Source/modules/serviceworkers/PaymentRequestRespondWithObserver.h
@@ -0,0 +1,43 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PaymentRequestRespondWithObserver_h
+#define PaymentRequestRespondWithObserver_h
+
+#include "modules/ModulesExport.h"
+#include "modules/serviceworkers/RespondWithObserver.h"
+#include "public/platform/modules/serviceworker/WebServiceWorkerResponseError.h"
+
+namespace blink {
+
+class ExecutionContext;
+class ScriptValue;
+class WaitUntilObserver;
+
+// This class observes the service worker's handling of a PaymentReqestEvent and
nhiroki 2017/03/08 02:28:16 s/PaymentReqestEvent/PaymentRequestEvent/
zino 2017/03/10 17:57:52 Done.
+// notifies the client.
+class MODULES_EXPORT PaymentRequestRespondWithObserver
shimazu 2017/03/08 01:39:25 I feel this class could be placed under modules/pa
nhiroki 2017/03/08 02:28:16 final?
zino 2017/03/10 17:57:52 Done.
+ : public RespondWithObserver {
+ public:
+ virtual ~PaymentRequestRespondWithObserver();
+
+ static PaymentRequestRespondWithObserver* create(ExecutionContext*,
+ int eventID,
+ WaitUntilObserver*);
+
+ void didDispatchEvent(DispatchEventResult dispatchResult) override;
+ void responseWasRejected(WebServiceWorkerResponseError) override;
+ void responseWasFulfilled(const ScriptValue&) override;
+
+ DECLARE_VIRTUAL_TRACE();
+
+ protected:
nhiroki 2017/03/08 02:28:16 private?
zino 2017/03/10 17:57:52 Done.
+ PaymentRequestRespondWithObserver(ExecutionContext*,
+ int eventID,
+ WaitUntilObserver*);
+};
+
+} // namespace blink
+
+#endif // PaymentRequestRespondWithObserver_h

Powered by Google App Engine
This is Rietveld 408576698