Chromium Code Reviews| 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 |