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

Unified Diff: Source/bindings/common/AbstractScriptPromise.h

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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
« no previous file with comments | « Source/bindings/common/AbstractArrayValue.h ('k') | Source/bindings/common/AbstractScriptPromiseResolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/common/AbstractScriptPromise.h
diff --git a/Source/bindings/common/AbstractScriptPromise.h b/Source/bindings/common/AbstractScriptPromise.h
new file mode 100644
index 0000000000000000000000000000000000000000..42e2bdf34ef6c569a3d4df5954b91b7d59b46ec7
--- /dev/null
+++ b/Source/bindings/common/AbstractScriptPromise.h
@@ -0,0 +1,42 @@
+// 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(v8::Handle<v8::Function> onFulfilled, v8::Handle<v8::Function> onRejected = v8::Handle<v8::Function>()) = 0;
+
+ 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
« no previous file with comments | « Source/bindings/common/AbstractArrayValue.h ('k') | Source/bindings/common/AbstractScriptPromiseResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698