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

Unified Diff: Source/core/dom/AnyCallback.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/AnyCallback.h
diff --git a/Source/core/html/parser/HTMLParserThread.h b/Source/core/dom/AnyCallback.h
similarity index 79%
copy from Source/core/html/parser/HTMLParserThread.h
copy to Source/core/dom/AnyCallback.h
index 138979a7881d04fdea622c7ccf1b9b158c82ff30..32c0545aab6051100d39a5db2411649bf2e5fd0d 100644
--- a/Source/core/html/parser/HTMLParserThread.h
+++ b/Source/core/dom/AnyCallback.h
@@ -28,27 +28,26 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HTMLParserThread_h
-#define HTMLParserThread_h
+#ifndef AnyCallback_h
+#define AnyCallback_h
-#include "wtf/Functional.h"
-#include "wtf/OwnPtr.h"
-#include <public/WebThread.h>
+#include "bindings/v8/ScriptValue.h"
+#include "core/dom/Future.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
-class HTMLParserThread {
-public:
- static HTMLParserThread* shared();
- void postTask(const Closure&);
+// Needed due to circular dependency.
+class Future;
+class ScriptExecutionContext;
-private:
- HTMLParserThread();
- ~HTMLParserThread();
+class AnyCallback : public RefCounted<AnyCallback> {
+public:
+ virtual ~AnyCallback() { }
- OwnPtr<WebKit::WebThread> m_thread;
+ virtual ScriptValue call(const ScriptValue&, PassRefPtr<Future>, bool*) = 0;
};
-} // namespace WebCore
+}
-#endif // HTMLParserThread_h
+#endif // AnyCallback_h
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/Future.h » ('j') | Source/core/dom/Future.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698