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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #include "gpu/config/gpu_info.h" | 74 #include "gpu/config/gpu_info.h" |
75 #include "ipc/ipc_sync_message_filter.h" | 75 #include "ipc/ipc_sync_message_filter.h" |
76 #include "media/audio/audio_output_device.h" | 76 #include "media/audio/audio_output_device.h" |
77 #include "media/base/audio_hardware_config.h" | 77 #include "media/base/audio_hardware_config.h" |
78 #include "media/base/key_systems.h" | 78 #include "media/base/key_systems.h" |
79 #include "media/base/mime_util.h" | 79 #include "media/base/mime_util.h" |
80 #include "media/blink/webcontentdecryptionmodule_impl.h" | 80 #include "media/blink/webcontentdecryptionmodule_impl.h" |
81 #include "media/filters/stream_parser_factory.h" | 81 #include "media/filters/stream_parser_factory.h" |
82 #include "storage/common/database/database_identifier.h" | 82 #include "storage/common/database/database_identifier.h" |
83 #include "storage/common/quota/quota_types.h" | 83 #include "storage/common/quota/quota_types.h" |
| 84 #include "third_party/WebKit/public/platform/URLConversion.h" |
84 #include "third_party/WebKit/public/platform/WebBatteryStatusListener.h" | 85 #include "third_party/WebKit/public/platform/WebBatteryStatusListener.h" |
85 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" | 86 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
86 #include "third_party/WebKit/public/platform/WebDeviceLightListener.h" | 87 #include "third_party/WebKit/public/platform/WebDeviceLightListener.h" |
87 #include "third_party/WebKit/public/platform/WebFileInfo.h" | 88 #include "third_party/WebKit/public/platform/WebFileInfo.h" |
88 #include "third_party/WebKit/public/platform/WebGamepads.h" | 89 #include "third_party/WebKit/public/platform/WebGamepads.h" |
89 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" | 90 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" |
90 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" | 91 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" |
91 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" | 92 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" |
92 #include "third_party/WebKit/public/platform/WebURL.h" | 93 #include "third_party/WebKit/public/platform/WebURL.h" |
93 #include "third_party/WebKit/public/platform/WebVector.h" | 94 #include "third_party/WebKit/public/platform/WebVector.h" |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 RenderThreadImpl::current()->EstablishGpuChannelSync( | 1020 RenderThreadImpl::current()->EstablishGpuChannelSync( |
1020 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
); | 1021 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
); |
1021 | 1022 |
1022 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; | 1023 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; |
1023 bool lose_context_when_out_of_memory = false; | 1024 bool lose_context_when_out_of_memory = false; |
1024 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 1025 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
1025 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( | 1026 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( |
1026 gpu_channel_host.get(), | 1027 gpu_channel_host.get(), |
1027 attributes, | 1028 attributes, |
1028 lose_context_when_out_of_memory, | 1029 lose_context_when_out_of_memory, |
1029 GURL(attributes.topDocumentURL), | 1030 blink::WebStringToGURL(attributes.topDocumentURL), |
1030 limits, | 1031 limits, |
1031 static_cast<WebGraphicsContext3DCommandBufferImpl*>(share_context))); | 1032 static_cast<WebGraphicsContext3DCommandBufferImpl*>(share_context))); |
1032 | 1033 |
1033 // Most likely the GPU process exited and the attempt to reconnect to it | 1034 // Most likely the GPU process exited and the attempt to reconnect to it |
1034 // failed. Need to try to restore the context again later. | 1035 // failed. Need to try to restore the context again later. |
1035 if (!context || !context->InitializeOnCurrentThread() || | 1036 if (!context || !context->InitializeOnCurrentThread() || |
1036 gl_info->testFailContext) { | 1037 gl_info->testFailContext) { |
1037 // Collect Graphicsinfo if there is a context failure or it is failed | 1038 // Collect Graphicsinfo if there is a context failure or it is failed |
1038 // purposefully in case of layout tests. | 1039 // purposefully in case of layout tests. |
1039 Collect3DContextInformationOnFailure(share_context, gl_info, | 1040 Collect3DContextInformationOnFailure(share_context, gl_info, |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 //------------------------------------------------------------------------------ | 1278 //------------------------------------------------------------------------------ |
1278 | 1279 |
1279 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1280 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
1280 const blink::WebBatteryStatus& status) { | 1281 const blink::WebBatteryStatus& status) { |
1281 if (!g_test_battery_status_listener) | 1282 if (!g_test_battery_status_listener) |
1282 return; | 1283 return; |
1283 g_test_battery_status_listener->updateBatteryStatus(status); | 1284 g_test_battery_status_listener->updateBatteryStatus(status); |
1284 } | 1285 } |
1285 | 1286 |
1286 } // namespace content | 1287 } // namespace content |
OLD | NEW |