Commit ba97ce52 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Expose WebDataConsumerHandleImpl constructor to blink

This will be needed to implement fetch API preloading support.

Bug: 652228
Change-Id: Icc7719a137731552cce5613fe006097d657af7ef
Reviewed-on: https://chromium-review.googlesource.com/544377Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481856}
parent ace092d0
......@@ -44,6 +44,7 @@
#include "content/child/notifications/notification_manager.h"
#include "content/child/push_messaging/push_provider.h"
#include "content/child/thread_safe_sender.h"
#include "content/child/web_data_consumer_handle_impl.h"
#include "content/child/web_url_loader_impl.h"
#include "content/child/web_url_request_util.h"
#include "content/child/worker_thread_registry.h"
......@@ -394,6 +395,12 @@ void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread,
BlinkPlatformImpl::~BlinkPlatformImpl() {
}
std::unique_ptr<blink::WebDataConsumerHandle>
BlinkPlatformImpl::CreateDataConsumerHandle(
mojo::ScopedDataPipeConsumerHandle handle) {
return base::MakeUnique<WebDataConsumerHandleImpl>(std::move(handle));
}
WebString BlinkPlatformImpl::UserAgent() {
return blink::WebString::FromUTF8(GetContentClient()->GetUserAgent());
}
......
......@@ -78,6 +78,8 @@ class CONTENT_EXPORT BlinkPlatformImpl
size_t MaxDecodedImageBytes() override;
uint32_t GetUniqueIdForProcess() override;
std::unique_ptr<blink::WebDataConsumerHandle> CreateDataConsumerHandle(
mojo::ScopedDataPipeConsumerHandle handle) override;
blink::WebString UserAgent() override;
blink::WebURLError CancelledError(const blink::WebURL& url) const override;
std::unique_ptr<blink::WebThread> CreateThread(const char* name) override;
......
......@@ -42,6 +42,7 @@
#include "WebAudioDevice.h"
#include "WebCommon.h"
#include "WebData.h"
#include "WebDataConsumerHandle.h"
#include "WebFeaturePolicy.h"
#include "WebGamepadListener.h"
#include "WebGestureDevice.h"
......@@ -59,6 +60,7 @@
#include "base/metrics/user_metrics_action.h"
#include "cc/resources/shared_bitmap.h"
#include "cc/surfaces/frame_sink_id.h"
#include "mojo/public/cpp/system/data_pipe.h"
#include "mojo/public/cpp/system/message_pipe.h"
namespace device {
......@@ -334,6 +336,12 @@ class BLINK_PLATFORM_EXPORT Platform {
// Returns a new WebURLLoader instance.
virtual std::unique_ptr<WebURLLoader> CreateURLLoader() { return nullptr; }
// Returns a WebDataConsumerHandle for given a mojo data pipe endpoint.
virtual std::unique_ptr<WebDataConsumerHandle> CreateDataConsumerHandle(
mojo::ScopedDataPipeConsumerHandle handle) {
return nullptr;
}
// May return null.
virtual WebPrescientNetworking* PrescientNetworking() { return nullptr; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment