| 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 c2ca182abf63d67784946f536e38b326b45fbe8c..bc18d9c258e9b3800e039f321fd108fc4e169bef 100644
|
| --- a/content/renderer/renderer_blink_platform_impl.cc
|
| +++ b/content/renderer/renderer_blink_platform_impl.cc
|
| @@ -58,6 +58,7 @@
|
| #include "content/renderer/media/media_recorder_handler.h"
|
| #include "content/renderer/media/renderer_webaudiodevice_impl.h"
|
| #include "content/renderer/media/renderer_webmidiaccessor_impl.h"
|
| +#include "content/renderer/media/rtc_certificate_generator.h"
|
| #include "content/renderer/render_thread_impl.h"
|
| #include "content/renderer/renderer_clipboard_delegate.h"
|
| #include "content/renderer/screen_orientation/screen_orientation_observer.h"
|
| @@ -302,7 +303,7 @@ blink::WebFileUtilities* RendererBlinkPlatformImpl::fileUtilities() {
|
| blink::WebSandboxSupport* RendererBlinkPlatformImpl::sandboxSupport() {
|
| #if defined(OS_ANDROID) || defined(OS_WIN)
|
| // These platforms do not require sandbox support.
|
| - return NULL;
|
| + return nullptr;
|
| #else
|
| return sandbox_support_.get();
|
| #endif
|
| @@ -310,7 +311,7 @@ blink::WebSandboxSupport* RendererBlinkPlatformImpl::sandboxSupport() {
|
|
|
| blink::WebCookieJar* RendererBlinkPlatformImpl::cookieJar() {
|
| NOTREACHED() << "Use WebFrameClient::cookieJar() instead!";
|
| - return NULL;
|
| + return nullptr;
|
| }
|
|
|
| blink::WebThemeEngine* RendererBlinkPlatformImpl::themeEngine() {
|
| @@ -388,7 +389,7 @@ void RendererBlinkPlatformImpl::suddenTerminationChanged(bool enabled) {
|
| }
|
|
|
| RenderThread* thread = RenderThread::Get();
|
| - if (thread) // NULL in unittests.
|
| + if (thread) // nullptr in unittests.
|
| thread->Send(new RenderProcessHostMsg_SuddenTerminationChanged(enabled));
|
| }
|
|
|
| @@ -549,7 +550,7 @@ bool RendererBlinkPlatformImpl::SandboxSupport::loadFont(NSFont* src_font,
|
| base::SharedMemoryHandle font_data;
|
| if (!RenderThread::Get()->Send(new RenderProcessHostMsg_LoadFont(
|
| src_font_descriptor, &font_data_size, &font_data, font_id))) {
|
| - *out = NULL;
|
| + *out = nullptr;
|
| *font_id = 0;
|
| return false;
|
| }
|
| @@ -558,7 +559,7 @@ bool RendererBlinkPlatformImpl::SandboxSupport::loadFont(NSFont* src_font,
|
| *font_id == 0) {
|
| LOG(ERROR) << "Bad response from RenderProcessHostMsg_LoadFont() for " <<
|
| src_font_descriptor.font_name;
|
| - *out = NULL;
|
| + *out = nullptr;
|
| *font_id = 0;
|
| return false;
|
| }
|
| @@ -654,7 +655,7 @@ bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() {
|
|
|
| bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() {
|
| RenderThreadImpl* thread = RenderThreadImpl::current();
|
| - // thread can be NULL in tests.
|
| + // thread can be nullptr in tests.
|
| return thread && thread->compositor_task_runner().get();
|
| }
|
|
|
| @@ -859,7 +860,7 @@ blink::WebScrollbarBehavior* RendererBlinkPlatformImpl::scrollbarBehavior() {
|
| //------------------------------------------------------------------------------
|
|
|
| WebBlobRegistry* RendererBlinkPlatformImpl::blobRegistry() {
|
| - // blob_registry_ can be NULL when running some tests.
|
| + // blob_registry_ can be nullptr when running some tests.
|
| return blob_registry_.get();
|
| }
|
|
|
| @@ -892,7 +893,7 @@ RendererBlinkPlatformImpl::createRTCPeerConnectionHandler(
|
| RenderThreadImpl* render_thread = RenderThreadImpl::current();
|
| DCHECK(render_thread);
|
| if (!render_thread)
|
| - return NULL;
|
| + return nullptr;
|
|
|
| #if defined(ENABLE_WEBRTC)
|
| WebRTCPeerConnectionHandler* peer_connection_handler =
|
| @@ -905,7 +906,18 @@ RendererBlinkPlatformImpl::createRTCPeerConnectionHandler(
|
| render_thread->GetPeerConnectionDependencyFactory();
|
| return rtc_dependency_factory->CreateRTCPeerConnectionHandler(client);
|
| #else
|
| - return NULL;
|
| + return nullptr;
|
| +#endif // defined(ENABLE_WEBRTC)
|
| +}
|
| +
|
| +//------------------------------------------------------------------------------
|
| +
|
| +blink::WebRTCCertificateGenerator*
|
| +RendererBlinkPlatformImpl::createRTCCertificateGenerator() {
|
| +#if defined(ENABLE_WEBRTC)
|
| + return new RTCCertificateGenerator();
|
| +#else
|
| + return nullptr;
|
| #endif // defined(ENABLE_WEBRTC)
|
| }
|
|
|
| @@ -916,7 +928,7 @@ WebMediaStreamCenter* RendererBlinkPlatformImpl::createMediaStreamCenter(
|
| RenderThreadImpl* render_thread = RenderThreadImpl::current();
|
| DCHECK(render_thread);
|
| if (!render_thread)
|
| - return NULL;
|
| + return nullptr;
|
| return render_thread->CreateMediaStreamCenter(client);
|
| }
|
|
|
| @@ -950,14 +962,14 @@ bool RendererBlinkPlatformImpl::processMemorySizesInBytes(
|
| blink::WebGraphicsContext3D*
|
| RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
|
| const blink::WebGraphicsContext3D::Attributes& attributes) {
|
| - return createOffscreenGraphicsContext3D(attributes, NULL);
|
| + return createOffscreenGraphicsContext3D(attributes, nullptr);
|
| }
|
|
|
| blink::WebGraphicsContext3D*
|
| RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
|
| const blink::WebGraphicsContext3D::Attributes& attributes,
|
| blink::WebGraphicsContext3D* share_context) {
|
| - return createOffscreenGraphicsContext3D(attributes, share_context, NULL);
|
| + return createOffscreenGraphicsContext3D(attributes, share_context, nullptr);
|
| }
|
|
|
| blink::WebGraphicsContext3D*
|
| @@ -966,7 +978,7 @@ RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
|
| blink::WebGraphicsContext3D* share_context,
|
| blink::WebGLInfo* gl_info) {
|
| if (!RenderThreadImpl::current())
|
| - return NULL;
|
| + return nullptr;
|
|
|
| scoped_refptr<GpuChannelHost> gpu_channel_host(
|
| RenderThreadImpl::current()->EstablishGpuChannelSync(
|
| @@ -1011,7 +1023,7 @@ RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
|
| // Most likely the GPU process exited and the attempt to reconnect to it
|
| // failed. Need to try to restore the context again later.
|
| if (!context || !context->InitializeOnCurrentThread())
|
| - return NULL;
|
| + return nullptr;
|
| return context.release();
|
| }
|
|
|
| @@ -1022,7 +1034,7 @@ RendererBlinkPlatformImpl::createSharedOffscreenGraphicsContext3DProvider() {
|
| scoped_refptr<cc_blink::ContextProviderWebContext> provider =
|
| RenderThreadImpl::current()->SharedMainThreadContextProvider();
|
| if (!provider.get())
|
| - return NULL;
|
| + return nullptr;
|
| return new WebGraphicsContext3DProviderImpl(provider);
|
| }
|
|
|
| @@ -1109,7 +1121,7 @@ RendererBlinkPlatformImpl::CreatePlatformEventObserverFromType(
|
| // hardware changes. In order to make that happen, they will receive a null
|
| // thread.
|
| if (thread && RenderThreadImpl::current()->layout_test_mode())
|
| - thread = NULL;
|
| + thread = nullptr;
|
|
|
| switch (type) {
|
| case blink::WebPlatformEventDeviceMotion:
|
| @@ -1129,7 +1141,7 @@ RendererBlinkPlatformImpl::CreatePlatformEventObserverFromType(
|
| "unknown type.";
|
| }
|
|
|
| - return NULL;
|
| + return nullptr;
|
| }
|
|
|
| void RendererBlinkPlatformImpl::SetPlatformEventObserverForTesting(
|
|
|