OLD | NEW |
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 PaymentCompleter_h | 5 #ifndef PaymentCompleter_h |
6 #define PaymentCompleter_h | 6 #define PaymentCompleter_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
10 #include "platform/heap/GarbageCollected.h" | 10 #include "platform/heap/GarbageCollected.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 enum PaymentComplete { | |
15 Success, | |
16 Fail, | |
17 Unknown | |
18 }; | |
19 | |
20 class ScriptState; | 14 class ScriptState; |
21 | 15 |
22 class MODULES_EXPORT PaymentCompleter : public GarbageCollectedMixin { | 16 class MODULES_EXPORT PaymentCompleter : public GarbageCollectedMixin { |
23 public: | 17 public: |
| 18 enum PaymentComplete { |
| 19 Success, |
| 20 Fail, |
| 21 Unknown |
| 22 }; |
| 23 |
24 virtual ScriptPromise complete(ScriptState*, PaymentComplete result) = 0; | 24 virtual ScriptPromise complete(ScriptState*, PaymentComplete result) = 0; |
25 | 25 |
26 protected: | 26 protected: |
27 virtual ~PaymentCompleter() {} | 27 virtual ~PaymentCompleter() {} |
28 }; | 28 }; |
29 | 29 |
30 } // namespace blink | 30 } // namespace blink |
31 | 31 |
32 #endif // PaymentCompleter_h | 32 #endif // PaymentCompleter_h |
OLD | NEW |