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

Unified Diff: Source/core/dom/FutureInit.h

Issue 15786003: WIP don't review: Implement Future (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/FutureInit.h
diff --git a/Source/core/html/parser/HTMLParserThread.h b/Source/core/dom/FutureInit.h
similarity index 75%
copy from Source/core/html/parser/HTMLParserThread.h
copy to Source/core/dom/FutureInit.h
index 138979a7881d04fdea622c7ccf1b9b158c82ff30..2f43e9ea9568ce2059fb0505dc4c9782e880a347 100644
--- a/Source/core/html/parser/HTMLParserThread.h
+++ b/Source/core/dom/FutureInit.h
@@ -28,27 +28,29 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HTMLParserThread_h
-#define HTMLParserThread_h
+#ifndef FutureInit_h
+#define FutureInit_h
-#include "wtf/Functional.h"
-#include "wtf/OwnPtr.h"
-#include <public/WebThread.h>
+#include "bindings/v8/ScriptValue.h"
+#include "core/dom/Future.h"
+#include "core/dom/FutureResolver.h"
+#include "core/dom/ScriptExecutionContext.h"
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
-class HTMLParserThread {
-public:
- static HTMLParserThread* shared();
- void postTask(const Closure&);
+// Needed due to circular dependency.
+class Future;
+class FutureResolver;
-private:
- HTMLParserThread();
- ~HTMLParserThread();
+class FutureInit : public RefCounted<FutureInit> {
+public:
+ virtual ~FutureInit() { }
- OwnPtr<WebKit::WebThread> m_thread;
+ virtual ScriptValue call(PassRefPtr<FutureResolver>, PassRefPtr<Future>, ScriptExecutionContext*) = 0;
};
-} // namespace WebCore
+}
-#endif // HTMLParserThread_h
+#endif // FutureInit_h

Powered by Google App Engine
This is Rietveld 408576698