OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/renderer_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 //------------------------------------------------------------------------------ | 953 //------------------------------------------------------------------------------ |
954 | 954 |
955 blink::WebSpeechSynthesizer* RendererBlinkPlatformImpl::createSpeechSynthesizer( | 955 blink::WebSpeechSynthesizer* RendererBlinkPlatformImpl::createSpeechSynthesizer( |
956 blink::WebSpeechSynthesizerClient* client) { | 956 blink::WebSpeechSynthesizerClient* client) { |
957 return GetContentClient()->renderer()->OverrideSpeechSynthesizer(client); | 957 return GetContentClient()->renderer()->OverrideSpeechSynthesizer(client); |
958 } | 958 } |
959 | 959 |
960 //------------------------------------------------------------------------------ | 960 //------------------------------------------------------------------------------ |
961 | 961 |
962 static void Collect3DContextInformationOnFailure( | 962 static void Collect3DContextInformationOnFailure( |
963 blink::WebGraphicsContext3D::WebGraphicsInfo* gl_info, | 963 blink::Platform::GraphicsInfo* gl_info, |
964 GpuChannelHost* host) { | 964 GpuChannelHost* host) { |
965 DCHECK(gl_info); | 965 DCHECK(gl_info); |
966 std::string error_message("OffscreenContext Creation failed, "); | 966 std::string error_message("OffscreenContext Creation failed, "); |
967 if (host) { | 967 if (host) { |
968 const gpu::GPUInfo& gpu_info = host->gpu_info(); | 968 const gpu::GPUInfo& gpu_info = host->gpu_info(); |
969 gl_info->vendorId = gpu_info.gpu.vendor_id; | 969 gl_info->vendorId = gpu_info.gpu.vendor_id; |
970 gl_info->deviceId = gpu_info.gpu.device_id; | 970 gl_info->deviceId = gpu_info.gpu.device_id; |
971 switch (gpu_info.context_info_state) { | 971 switch (gpu_info.context_info_state) { |
972 case gpu::kCollectInfoSuccess: | 972 case gpu::kCollectInfoSuccess: |
973 case gpu::kCollectInfoNonFatalFailure: | 973 case gpu::kCollectInfoNonFatalFailure: |
(...skipping 20 matching lines...) Expand all Loading... |
994 } else { | 994 } else { |
995 error_message.append("GpuChannelHost creation failed"); | 995 error_message.append("GpuChannelHost creation failed"); |
996 gl_info->errorMessage = WebString::fromUTF8(error_message); | 996 gl_info->errorMessage = WebString::fromUTF8(error_message); |
997 } | 997 } |
998 } | 998 } |
999 | 999 |
1000 blink::WebGraphicsContext3DProvider* | 1000 blink::WebGraphicsContext3DProvider* |
1001 RendererBlinkPlatformImpl::createOffscreenGraphicsContext3DProvider( | 1001 RendererBlinkPlatformImpl::createOffscreenGraphicsContext3DProvider( |
1002 const blink::WebGraphicsContext3D::Attributes& attributes, | 1002 const blink::WebGraphicsContext3D::Attributes& attributes, |
1003 blink::WebGraphicsContext3DProvider* share_provider, | 1003 blink::WebGraphicsContext3DProvider* share_provider, |
1004 blink::WebGraphicsContext3D::WebGraphicsInfo* gl_info) { | 1004 blink::Platform::GraphicsInfo* gl_info) { |
1005 DCHECK(gl_info); | 1005 DCHECK(gl_info); |
1006 if (!RenderThreadImpl::current()) { | 1006 if (!RenderThreadImpl::current()) { |
1007 std::string error_message("Failed to run in Current RenderThreadImpl"); | 1007 std::string error_message("Failed to run in Current RenderThreadImpl"); |
1008 gl_info->errorMessage = WebString::fromUTF8(error_message); | 1008 gl_info->errorMessage = WebString::fromUTF8(error_message); |
1009 return nullptr; | 1009 return nullptr; |
1010 } | 1010 } |
1011 | 1011 |
1012 scoped_refptr<GpuChannelHost> gpu_channel_host( | 1012 scoped_refptr<GpuChannelHost> gpu_channel_host( |
1013 RenderThreadImpl::current()->EstablishGpuChannelSync( | 1013 RenderThreadImpl::current()->EstablishGpuChannelSync( |
1014 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
); | 1014 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1263 } | 1263 } |
1264 | 1264 |
1265 //------------------------------------------------------------------------------ | 1265 //------------------------------------------------------------------------------ |
1266 | 1266 |
1267 blink::WebTrialTokenValidator* | 1267 blink::WebTrialTokenValidator* |
1268 RendererBlinkPlatformImpl::trialTokenValidator() { | 1268 RendererBlinkPlatformImpl::trialTokenValidator() { |
1269 return &trial_token_validator_; | 1269 return &trial_token_validator_; |
1270 } | 1270 } |
1271 | 1271 |
1272 } // namespace content | 1272 } // namespace content |
OLD | NEW |