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

Unified Diff: Source/web/WebThreadedDataReceiver.cpp

Issue 863113004: Make WebThreadedDataReceiver wrap a Blink-managed object instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix msvc compilation Created 5 years, 11 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/web/WebThreadedDataReceiver.cpp
diff --git a/Source/web/WebThreadedDataReceiver.cpp b/Source/web/WebThreadedDataReceiver.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..aa090f8df04001df0876c04ee9b1516f7e276b9d
--- /dev/null
+++ b/Source/web/WebThreadedDataReceiver.cpp
@@ -0,0 +1,47 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "public/platform/WebThreadedDataReceiver.h"
+
+#include "core/html/parser/ThreadedDataReceiver.h"
+
+namespace blink {
+
+WebThreadedDataReceiver::WebThreadedDataReceiver(const PassRefPtrWillBeRawPtr<ThreadedDataReceiver>& threadedDataReceiver)
+ : m_private(threadedDataReceiver)
+{
+}
+
+void WebThreadedDataReceiver::reset()
+{
+ m_private.reset();
+}
+
+void WebThreadedDataReceiver::assign(const WebThreadedDataReceiver& other)
+{
+ m_private = other.m_private;
+}
+
+void WebThreadedDataReceiver::acceptData(const char* data, int dataLength)
+{
+ return m_private->acceptData(data, dataLength);
+}
+
+WebThread* WebThreadedDataReceiver::backgroundThread()
+{
+ return m_private->backgroundThread();
+}
+
+bool WebThreadedDataReceiver::needsMainthreadDataCopy()
+{
+ return m_private->needsMainthreadDataCopy();
+}
+
+void WebThreadedDataReceiver::acceptMainthreadDataNotification(const char* data, int dataLength, int encodedDataLength)
+{
+ return m_private->acceptMainthreadDataNotification(data, dataLength, encodedDataLength);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698