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

Unified Diff: public/platform/WebParserResourceBridge.h

Issue 100563004: Redirect HTML resource bytes directly to parser thread (Blink side CL) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parserthread_decodermove
Patch Set: Missing include Created 7 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
Index: public/platform/WebParserResourceBridge.h
diff --git a/Source/core/html/parser/HTMLParserThread.h b/public/platform/WebParserResourceBridge.h
similarity index 76%
rename from Source/core/html/parser/HTMLParserThread.h
rename to public/platform/WebParserResourceBridge.h
index e0b85f9399c3856f6881e3fed668477b8a4257c2..ec7cea329a74223e33bfd50e15e4eed7a3c901be 100644
--- a/Source/core/html/parser/HTMLParserThread.h
+++ b/public/platform/WebParserResourceBridge.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,27 +28,26 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HTMLParserThread_h
-#define HTMLParserThread_h
+#ifndef WebParserResourceBridge_h
+#define WebParserResourceBridge_h
-#include "wtf/Functional.h"
-#include "wtf/OwnPtr.h"
-#include "public/platform/WebThread.h"
+namespace blink {
-namespace WebCore {
+class WebThread;
-class HTMLParserThread {
+class WebParserResourceBridge {
abarth-chromium 2013/12/18 18:28:49 Is this specific to parsers? It seems like a gene
public:
- static HTMLParserThread* shared();
- void postTask(const Closure&);
+ class Peer {
abarth-chromium 2013/12/18 18:28:49 I'd make this a top-level class instead of a neste
+ public:
+ virtual void OnReceivedData(const char* data, size_t length) = 0;
abarth-chromium 2013/12/18 18:28:49 didReceivedData
+ };
-private:
- HTMLParserThread();
- ~HTMLParserThread();
+ virtual void setPeer(Peer*) = 0;
abarth-chromium 2013/12/18 18:28:49 setClient
+ virtual WebThread* getParserThread() = 0;
abarth-chromium 2013/12/18 18:28:49 If this interface isn't specific to parsing, perha
- OwnPtr<blink::WebThread> m_thread;
+ virtual ~WebParserResourceBridge() { }
};
-} // namespace WebCore
+} // namespace blink
-#endif // HTMLParserThread_h
+#endif

Powered by Google App Engine
This is Rietveld 408576698