mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
(The merge base is r180365, roughly three weeks behind where Sky forked from Blink at r181355.) sky/engine/bindings-dart was third_party/WebKit/Source/bindings/ R=rafaelw@chromium.org Review URL: https://codereview.chromium.org/875013003
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
// Copyright 2014 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 AbstractScriptPromise_h
|
|
#define AbstractScriptPromise_h
|
|
|
|
#include "bindings/core/v8/ScriptFunction.h"
|
|
#include "platform/heap/Handle.h"
|
|
#include "wtf/PassOwnPtr.h"
|
|
#include "wtf/PassRefPtr.h"
|
|
#include <v8.h>
|
|
|
|
namespace blink {
|
|
|
|
class AbstractScriptPromise : public RefCounted<AbstractScriptPromise> {
|
|
WTF_MAKE_NONCOPYABLE(AbstractScriptPromise);
|
|
public:
|
|
virtual ~AbstractScriptPromise() { }
|
|
|
|
virtual PassRefPtr<AbstractScriptPromise> then(PassOwnPtr<ScriptFunction> onFulfilled, PassOwnPtr<ScriptFunction> onRejected = PassOwnPtr<ScriptFunction>()) = 0;
|
|
|
|
virtual bool isDartScriptPromise() const { return false; }
|
|
virtual bool isV8ScriptPromise() const { return false; }
|
|
virtual bool equals(PassRefPtr<AbstractScriptPromise>) const = 0;
|
|
|
|
virtual bool isObject() const = 0;
|
|
virtual bool isNull() const = 0;
|
|
virtual bool isUndefinedOrNull() const = 0;
|
|
virtual bool isEmpty() const = 0;
|
|
virtual void clear() = 0;
|
|
|
|
// FIXMEMULTIVM: Remove.
|
|
virtual v8::Handle<v8::Value> v8Value() const = 0;
|
|
virtual v8::Isolate* isolate() const = 0;
|
|
|
|
protected:
|
|
AbstractScriptPromise() { }
|
|
};
|
|
|
|
} // namespace blink
|
|
|
|
#endif // AbstractScriptPromise_h
|