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

Unified Diff: public/platform/WebThreadedResourceProvider.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: Created 6 years, 10 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: public/platform/WebThreadedResourceProvider.h
diff --git a/Source/core/html/parser/HTMLParserThread.h b/public/platform/WebThreadedResourceProvider.h
similarity index 66%
rename from Source/core/html/parser/HTMLParserThread.h
rename to public/platform/WebThreadedResourceProvider.h
index a350c80e1459b28c224b6f6f0620b50d0b18ea10..d8f617c77dafa6670e5bf20a694cd86c74449220 100644
--- a/Source/core/html/parser/HTMLParserThread.h
+++ b/public/platform/WebThreadedResourceProvider.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,34 +28,34 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HTMLParserThread_h
-#define HTMLParserThread_h
+#ifndef WebThreadedResourceProvider_h
+#define WebThreadedResourceProvider_h
-#include "wtf/Functional.h"
-#include "wtf/OwnPtr.h"
-#include "public/platform/WebThread.h"
+namespace blink {
-namespace WebCore {
+class WebThread;
-class HTMLParserThread {
+class WebThreadedResourceBackgroundClient {
darin (slow to review) 2014/02/16 07:12:27 nit: The rule for the Blink public API is one file
public:
darin (slow to review) 2014/02/16 07:12:27 this interface should have a virtual destructor to
- static void init();
- static void shutdown();
-
- // It is an error to call shared() before init() or after shutdown();
- static HTMLParserThread* shared();
+ virtual void didReceivedData(const char* data, size_t length) = 0;
+};
- void postTask(const Closure&);
+class WebThreadedResourceForegroundClient {
+public:
+ virtual void didSwitchedToBackgroundClient() = 0;
darin (slow to review) 2014/02/16 07:12:27 This function could also be part of WebURLLoaderCl
oystein (OOO til 10th of July) 2014/02/20 18:43:08 Folding this into WebURLLoaderClient to make it mo
-private:
- HTMLParserThread();
- ~HTMLParserThread();
+ virtual ~WebThreadedResourceForegroundClient() { }
+};
- blink::WebThread& ensureThread();
+class WebThreadedResourceProvider {
darin (slow to review) 2014/02/16 07:12:27 I think it would be helpful to provide some docume
+public:
+ virtual void setBackgroundClient(WebThreadedResourceBackgroundClient*) = 0;
+ virtual void setForegroundClient(WebThreadedResourceForegroundClient*) = 0;
+ virtual WebThread* resourceProviderThread() = 0;
darin (slow to review) 2014/02/16 07:12:27 I have a feeling that the resourceProviderThread i
- OwnPtr<blink::WebThread> m_thread;
+ virtual ~WebThreadedResourceProvider() { }
};
-} // namespace WebCore
+} // namespace blink
-#endif // HTMLParserThread_h
+#endif

Powered by Google App Engine
This is Rietveld 408576698