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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentResponse.h

Issue 1753543002: PaymentRequest Mojo bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface
Patch Set: Disable WTF-Mojo string serialization for now. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PaymentResponse_h 5 #ifndef PaymentResponse_h
6 #define PaymentResponse_h 6 #define PaymentResponse_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "public/platform/modules/payments/payment_request.mojom-blink.h"
12 #include "wtf/Noncopyable.h" 13 #include "wtf/Noncopyable.h"
13 #include "wtf/text/WTFString.h" 14 #include "wtf/text/WTFString.h"
14 15
15 namespace blink { 16 namespace blink {
16 17
17 class ExceptionState; 18 class ExceptionState;
19 class PaymentRequest;
18 class ScriptState; 20 class ScriptState;
19 21
20 class PaymentResponse final : public GarbageCollectedFinalized<PaymentResponse>, public ScriptWrappable { 22 class PaymentResponse final : public GarbageCollectedFinalized<PaymentResponse>, public ScriptWrappable {
21 DEFINE_WRAPPERTYPEINFO(); 23 DEFINE_WRAPPERTYPEINFO();
22 WTF_MAKE_NONCOPYABLE(PaymentResponse); 24 WTF_MAKE_NONCOPYABLE(PaymentResponse);
23 25
24 public: 26 public:
25 PaymentResponse(); 27 PaymentResponse(mojom::blink::PaymentResponsePtr, PaymentRequest*);
26 virtual ~PaymentResponse(); 28 virtual ~PaymentResponse();
27 29
28 const String& methodName() const { return m_methodName; } 30 const String& methodName() const { return m_methodName; }
29 ScriptValue details(ScriptState*, ExceptionState&) const; 31 ScriptValue details(ScriptState*, ExceptionState&) const;
30 32
31 ScriptPromise complete(ScriptState*, bool success); 33 ScriptPromise complete(ScriptState*, bool success);
32 34
33 DEFINE_INLINE_TRACE() {} 35 DECLARE_TRACE();
34 36
35 private: 37 private:
36 String m_methodName; 38 String m_methodName;
37 String m_stringifiedDetails; 39 String m_stringifiedDetails;
40 Member<PaymentRequest> m_paymentRequest;
38 }; 41 };
39 42
40 } // namespace blink 43 } // namespace blink
41 44
42 #endif // PaymentResponse_h 45 #endif // PaymentResponse_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698