Index: content/renderer/renderer_blink_platform_impl.cc |
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc |
index 18a3abfc23b0832813afb31f541b3b2469ee94d7..371943b8479728f0ed260c7f5fb9d352511f2f40 100644 |
--- a/content/renderer/renderer_blink_platform_impl.cc |
+++ b/content/renderer/renderer_blink_platform_impl.cc |
@@ -89,19 +89,15 @@ |
#include "third_party/WebKit/public/platform/WebAudioLatencyHint.h" |
#include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
#include "third_party/WebKit/public/platform/WebFileInfo.h" |
-#include "third_party/WebKit/public/platform/WebMediaRecorderHandler.h" |
#include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" |
#include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" |
#include "third_party/WebKit/public/platform/WebPluginListBuilder.h" |
-#include "third_party/WebKit/public/platform/WebRTCCertificateGenerator.h" |
-#include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h" |
#include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
#include "third_party/WebKit/public/platform/WebThread.h" |
#include "third_party/WebKit/public/platform/WebURL.h" |
#include "third_party/WebKit/public/platform/WebVector.h" |
#include "third_party/WebKit/public/platform/modules/device_orientation/WebDeviceMotionListener.h" |
#include "third_party/WebKit/public/platform/modules/device_orientation/WebDeviceOrientationListener.h" |
-#include "third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessor.h" |
#include "third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h" |
#include "third_party/WebKit/public/web/WebLocalFrame.h" |
#include "url/gurl.h" |
@@ -153,6 +149,7 @@ |
using blink::WebFileSystem; |
using blink::WebIDBFactory; |
using blink::WebImageCaptureFrameGrabber; |
+using blink::WebMIDIAccessor; |
using blink::WebMediaPlayer; |
using blink::WebMediaRecorderHandler; |
using blink::WebMediaStream; |
@@ -466,19 +463,17 @@ |
thread->Send(new RenderProcessHostMsg_SuddenTerminationChanged(enabled)); |
} |
-std::unique_ptr<WebStorageNamespace> |
-RendererBlinkPlatformImpl::CreateLocalStorageNamespace() { |
+WebStorageNamespace* RendererBlinkPlatformImpl::CreateLocalStorageNamespace() { |
if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kMojoLocalStorage)) { |
if (!local_storage_cached_areas_) { |
local_storage_cached_areas_.reset(new LocalStorageCachedAreas( |
RenderThreadImpl::current()->GetStoragePartitionService())); |
} |
- return base::MakeUnique<LocalStorageNamespace>( |
- local_storage_cached_areas_.get()); |
- } |
- |
- return base::MakeUnique<WebStorageNamespaceImpl>(); |
+ return new LocalStorageNamespace(local_storage_cached_areas_.get()); |
+ } |
+ |
+ return new WebStorageNamespaceImpl(); |
} |
@@ -490,11 +485,10 @@ |
//------------------------------------------------------------------------------ |
-std::unique_ptr<blink::WebServiceWorkerCacheStorage> |
-RendererBlinkPlatformImpl::CreateCacheStorage( |
+blink::WebServiceWorkerCacheStorage* RendererBlinkPlatformImpl::CacheStorage( |
const blink::WebSecurityOrigin& security_origin) { |
- return base::MakeUnique<WebServiceWorkerCacheStorageImpl>( |
- thread_safe_sender_.get(), security_origin); |
+ return new WebServiceWorkerCacheStorageImpl(thread_safe_sender_.get(), |
+ security_origin); |
} |
//------------------------------------------------------------------------------ |
@@ -686,7 +680,7 @@ |
return web_database_observer_impl_.get(); |
} |
-std::unique_ptr<WebAudioDevice> RendererBlinkPlatformImpl::CreateAudioDevice( |
+WebAudioDevice* RendererBlinkPlatformImpl::CreateAudioDevice( |
unsigned input_channels, |
unsigned channels, |
const blink::WebAudioLatencyHint& latency_hint, |
@@ -694,7 +688,7 @@ |
const blink::WebString& input_device_id, |
const blink::WebSecurityOrigin& security_origin) { |
// Use a mock for testing. |
- std::unique_ptr<blink::WebAudioDevice> mock_device = |
+ blink::WebAudioDevice* mock_device = |
GetContentClient()->renderer()->OverrideCreateAudioDevice(latency_hint); |
if (mock_device) |
return mock_device; |
@@ -727,15 +721,14 @@ |
//------------------------------------------------------------------------------ |
-std::unique_ptr<blink::WebMIDIAccessor> |
-RendererBlinkPlatformImpl::CreateMIDIAccessor( |
+blink::WebMIDIAccessor* RendererBlinkPlatformImpl::CreateMIDIAccessor( |
blink::WebMIDIAccessorClient* client) { |
- std::unique_ptr<blink::WebMIDIAccessor> accessor = |
+ blink::WebMIDIAccessor* accessor = |
GetContentClient()->renderer()->OverrideCreateMIDIAccessor(client); |
if (accessor) |
return accessor; |
- return base::MakeUnique<RendererWebMIDIAccessorImpl>(client); |
+ return new RendererWebMIDIAccessorImpl(client); |
} |
void RendererBlinkPlatformImpl::GetPluginList( |
@@ -798,10 +791,10 @@ |
//------------------------------------------------------------------------------ |
-std::unique_ptr<WebMediaRecorderHandler> |
+WebMediaRecorderHandler* |
RendererBlinkPlatformImpl::CreateMediaRecorderHandler() { |
#if BUILDFLAG(ENABLE_WEBRTC) |
- return base::MakeUnique<content::MediaRecorderHandler>(); |
+ return new content::MediaRecorderHandler(); |
#else |
return nullptr; |
#endif |
@@ -809,16 +802,16 @@ |
//------------------------------------------------------------------------------ |
-std::unique_ptr<WebRTCPeerConnectionHandler> |
+WebRTCPeerConnectionHandler* |
RendererBlinkPlatformImpl::CreateRTCPeerConnectionHandler( |
WebRTCPeerConnectionHandlerClient* client) { |
RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
DCHECK(render_thread); |
if (!render_thread) |
- return nullptr; |
+ return NULL; |
#if BUILDFLAG(ENABLE_WEBRTC) |
- std::unique_ptr<WebRTCPeerConnectionHandler> peer_connection_handler = |
+ WebRTCPeerConnectionHandler* peer_connection_handler = |
GetContentClient()->renderer()->OverrideCreateWebRTCPeerConnectionHandler( |
client); |
if (peer_connection_handler) |
@@ -828,16 +821,16 @@ |
render_thread->GetPeerConnectionDependencyFactory(); |
return rtc_dependency_factory->CreateRTCPeerConnectionHandler(client); |
#else |
- return nullptr; |
+ return NULL; |
#endif // BUILDFLAG(ENABLE_WEBRTC) |
} |
//------------------------------------------------------------------------------ |
-std::unique_ptr<blink::WebRTCCertificateGenerator> |
+blink::WebRTCCertificateGenerator* |
RendererBlinkPlatformImpl::CreateRTCCertificateGenerator() { |
#if BUILDFLAG(ENABLE_WEBRTC) |
- return base::MakeUnique<RTCCertificateGenerator>(); |
+ return new RTCCertificateGenerator(); |
#else |
return nullptr; |
#endif // BUILDFLAG(ENABLE_WEBRTC) |
@@ -845,13 +838,12 @@ |
//------------------------------------------------------------------------------ |
-std::unique_ptr<WebMediaStreamCenter> |
-RendererBlinkPlatformImpl::CreateMediaStreamCenter( |
+WebMediaStreamCenter* RendererBlinkPlatformImpl::CreateMediaStreamCenter( |
WebMediaStreamCenterClient* client) { |
RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
DCHECK(render_thread); |
if (!render_thread) |
- return nullptr; |
+ return NULL; |
return render_thread->CreateMediaStreamCenter(client); |
} |
@@ -864,8 +856,7 @@ |
//------------------------------------------------------------------------------ |
-std::unique_ptr<WebCanvasCaptureHandler> |
-RendererBlinkPlatformImpl::CreateCanvasCaptureHandler( |
+WebCanvasCaptureHandler* RendererBlinkPlatformImpl::CreateCanvasCaptureHandler( |
const WebSize& size, |
double frame_rate, |
WebMediaStreamTrack* track) { |
@@ -923,10 +914,10 @@ |
//------------------------------------------------------------------------------ |
-std::unique_ptr<WebImageCaptureFrameGrabber> |
+WebImageCaptureFrameGrabber* |
RendererBlinkPlatformImpl::CreateImageCaptureFrameGrabber() { |
#if BUILDFLAG(ENABLE_WEBRTC) |
- return base::MakeUnique<ImageCaptureFrameGrabber>(); |
+ return new ImageCaptureFrameGrabber(); |
#else |
return nullptr; |
#endif // BUILDFLAG(ENABLE_WEBRTC) |
@@ -934,8 +925,7 @@ |
//------------------------------------------------------------------------------ |
-std::unique_ptr<blink::WebSpeechSynthesizer> |
-RendererBlinkPlatformImpl::CreateSpeechSynthesizer( |
+blink::WebSpeechSynthesizer* RendererBlinkPlatformImpl::CreateSpeechSynthesizer( |
blink::WebSpeechSynthesizerClient* client) { |
return GetContentClient()->renderer()->OverrideSpeechSynthesizer(client); |
} |
@@ -970,7 +960,7 @@ |
} |
} |
-std::unique_ptr<blink::WebGraphicsContext3DProvider> |
+blink::WebGraphicsContext3DProvider* |
RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider( |
const blink::Platform::ContextAttributes& web_attributes, |
const blink::WebURL& top_document_web_url, |
@@ -1048,13 +1038,13 @@ |
GURL(top_document_web_url), automatic_flushes, support_locking, |
gpu::SharedMemoryLimits(), attributes, share_context, |
ui::command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_WEBGL)); |
- return base::MakeUnique<WebGraphicsContext3DProviderImpl>( |
- std::move(provider), is_software_rendering); |
-} |
- |
-//------------------------------------------------------------------------------ |
- |
-std::unique_ptr<blink::WebGraphicsContext3DProvider> |
+ return new WebGraphicsContext3DProviderImpl(std::move(provider), |
+ is_software_rendering); |
+} |
+ |
+//------------------------------------------------------------------------------ |
+ |
+blink::WebGraphicsContext3DProvider* |
RendererBlinkPlatformImpl::CreateSharedOffscreenGraphicsContext3DProvider() { |
auto* thread = RenderThreadImpl::current(); |
@@ -1075,8 +1065,8 @@ |
bool is_software_rendering = host->gpu_info().software_rendering; |
- return base::MakeUnique<WebGraphicsContext3DProviderImpl>( |
- std::move(provider), is_software_rendering); |
+ return new WebGraphicsContext3DProviderImpl(std::move(provider), |
+ is_software_rendering); |
} |
//------------------------------------------------------------------------------ |