Index: public/platform/WebThreadedDataReceiver.h |
diff --git a/public/platform/WebThreadedDataReceiver.h b/public/platform/WebThreadedDataReceiver.h |
index 516c13b870bc61b75e539c13ee153172a7cafa3c..99f32facc539ea32d0c82c529cf8a8abf698cb78 100644 |
--- a/public/platform/WebThreadedDataReceiver.h |
+++ b/public/platform/WebThreadedDataReceiver.h |
@@ -5,21 +5,44 @@ |
#ifndef WebThreadedDataReceiver_h |
#define WebThreadedDataReceiver_h |
+#include "public/platform/WebPrivatePtr.h" |
+ |
namespace blink { |
+class ThreadedDataReceiver; |
class WebThread; |
class WebThreadedDataReceiver { |
public: |
- virtual void acceptData(const char* data, int dataLength) = 0; |
- virtual WebThread* backgroundThread() = 0; |
+ ~WebThreadedDataReceiver() { reset(); } |
+ |
+ WebThreadedDataReceiver() { } |
+ WebThreadedDataReceiver(const WebThreadedDataReceiver& r) { assign(r); } |
+ WebThreadedDataReceiver& operator=(const WebThreadedDataReceiver& r) |
+ { |
+ assign(r); |
+ return *this; |
+ } |
+ |
+ BLINK_EXPORT void reset(); |
+ BLINK_EXPORT void assign(const WebThreadedDataReceiver&); |
+ |
+ bool isNull() const { return m_private.isNull(); } |
- virtual bool needsMainthreadDataCopy() = 0; |
- virtual void acceptMainthreadDataNotification(const char* data, int dataLength, int encodedDataLength) = 0; |
+#if BLINK_IMPLEMENTATION |
+ explicit WebThreadedDataReceiver(const PassRefPtrWillBeRawPtr<ThreadedDataReceiver>&); |
+#endif |
+ |
+ BLINK_EXPORT void acceptData(const char* data, int dataLength); |
+ BLINK_EXPORT WebThread* backgroundThread(); |
- virtual ~WebThreadedDataReceiver() { } |
+ BLINK_EXPORT bool needsMainthreadDataCopy(); |
+ BLINK_EXPORT void acceptMainthreadDataNotification(const char* data, int dataLength, int encodedDataLength); |
+ |
+private: |
+ WebPrivatePtr<ThreadedDataReceiver> m_private; |
}; |
} // namespace blink |
-#endif |
+#endif // WebThreadedDataReceiver_h |