| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef AbstractScriptPromise_h | |
| 6 #define AbstractScriptPromise_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptFunction.h" | |
| 9 #include "platform/heap/Handle.h" | |
| 10 #include "wtf/PassOwnPtr.h" | |
| 11 #include "wtf/PassRefPtr.h" | |
| 12 #include <v8.h> | |
| 13 | |
| 14 namespace blink { | |
| 15 | |
| 16 class AbstractScriptPromise : public RefCounted<AbstractScriptPromise> { | |
| 17 WTF_MAKE_NONCOPYABLE(AbstractScriptPromise); | |
| 18 public: | |
| 19 virtual ~AbstractScriptPromise() { } | |
| 20 | |
| 21 virtual PassRefPtr<AbstractScriptPromise> then(PassOwnPtr<ScriptFunction> on
Fulfilled, PassOwnPtr<ScriptFunction> onRejected = PassOwnPtr<ScriptFunction>())
= 0; | |
| 22 | |
| 23 virtual bool isDartScriptPromise() const { return false; } | |
| 24 virtual bool isV8ScriptPromise() const { return false; } | |
| 25 virtual bool equals(PassRefPtr<AbstractScriptPromise>) const = 0; | |
| 26 | |
| 27 virtual bool isObject() const = 0; | |
| 28 virtual bool isNull() const = 0; | |
| 29 virtual bool isUndefinedOrNull() const = 0; | |
| 30 virtual bool isEmpty() const = 0; | |
| 31 virtual void clear() = 0; | |
| 32 | |
| 33 // FIXMEMULTIVM: Remove. | |
| 34 virtual v8::Handle<v8::Value> v8Value() const = 0; | |
| 35 virtual v8::Isolate* isolate() const = 0; | |
| 36 | |
| 37 protected: | |
| 38 AbstractScriptPromise() { } | |
| 39 }; | |
| 40 | |
| 41 } // namespace blink | |
| 42 | |
| 43 #endif // AbstractScriptPromise_h | |
| OLD | NEW |