| 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 26 matching lines...) Expand all Loading... |
| 37 #include "content/child/web_database_observer_impl.h" | 37 #include "content/child/web_database_observer_impl.h" |
| 38 #include "content/child/web_url_loader_impl.h" | 38 #include "content/child/web_url_loader_impl.h" |
| 39 #include "content/child/webblobregistry_impl.h" | 39 #include "content/child/webblobregistry_impl.h" |
| 40 #include "content/child/webfileutilities_impl.h" | 40 #include "content/child/webfileutilities_impl.h" |
| 41 #include "content/child/webmessageportchannel_impl.h" | 41 #include "content/child/webmessageportchannel_impl.h" |
| 42 #include "content/common/file_utilities_messages.h" | 42 #include "content/common/file_utilities_messages.h" |
| 43 #include "content/common/frame_messages.h" | 43 #include "content/common/frame_messages.h" |
| 44 #include "content/common/gpu/client/context_provider_command_buffer.h" | 44 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 45 #include "content/common/gpu/client/gpu_channel_host.h" | 45 #include "content/common/gpu/client/gpu_channel_host.h" |
| 46 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 46 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 47 #include "content/common/gpu/gpu_process_launch_causes.h" | |
| 48 #include "content/common/mime_registry_messages.h" | 47 #include "content/common/mime_registry_messages.h" |
| 49 #include "content/common/render_process_messages.h" | 48 #include "content/common/render_process_messages.h" |
| 50 #include "content/public/common/content_switches.h" | 49 #include "content/public/common/content_switches.h" |
| 51 #include "content/public/common/service_registry.h" | 50 #include "content/public/common/service_registry.h" |
| 52 #include "content/public/common/webplugininfo.h" | 51 #include "content/public/common/webplugininfo.h" |
| 53 #include "content/public/renderer/content_renderer_client.h" | 52 #include "content/public/renderer/content_renderer_client.h" |
| 54 #include "content/public/renderer/media_stream_utils.h" | 53 #include "content/public/renderer/media_stream_utils.h" |
| 55 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h" | 54 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h" |
| 56 #include "content/renderer/device_sensors/device_light_event_pump.h" | 55 #include "content/renderer/device_sensors/device_light_event_pump.h" |
| 57 #include "content/renderer/device_sensors/device_motion_event_pump.h" | 56 #include "content/renderer/device_sensors/device_motion_event_pump.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 68 #include "content/renderer/media/renderer_webaudiodevice_impl.h" | 67 #include "content/renderer/media/renderer_webaudiodevice_impl.h" |
| 69 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" | 68 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" |
| 70 #include "content/renderer/media/rtc_certificate_generator.h" | 69 #include "content/renderer/media/rtc_certificate_generator.h" |
| 71 #include "content/renderer/render_thread_impl.h" | 70 #include "content/renderer/render_thread_impl.h" |
| 72 #include "content/renderer/renderer_clipboard_delegate.h" | 71 #include "content/renderer/renderer_clipboard_delegate.h" |
| 73 #include "content/renderer/screen_orientation/screen_orientation_observer.h" | 72 #include "content/renderer/screen_orientation/screen_orientation_observer.h" |
| 74 #include "content/renderer/webclipboard_impl.h" | 73 #include "content/renderer/webclipboard_impl.h" |
| 75 #include "content/renderer/webgraphicscontext3d_provider_impl.h" | 74 #include "content/renderer/webgraphicscontext3d_provider_impl.h" |
| 76 #include "content/renderer/webpublicsuffixlist_impl.h" | 75 #include "content/renderer/webpublicsuffixlist_impl.h" |
| 77 #include "gpu/config/gpu_info.h" | 76 #include "gpu/config/gpu_info.h" |
| 77 #include "gpu/ipc/common/gpu_process_launch_causes.h" |
| 78 #include "ipc/ipc_sync_message_filter.h" | 78 #include "ipc/ipc_sync_message_filter.h" |
| 79 #include "media/audio/audio_output_device.h" | 79 #include "media/audio/audio_output_device.h" |
| 80 #include "media/base/audio_hardware_config.h" | 80 #include "media/base/audio_hardware_config.h" |
| 81 #include "media/base/mime_util.h" | 81 #include "media/base/mime_util.h" |
| 82 #include "media/blink/webcontentdecryptionmodule_impl.h" | 82 #include "media/blink/webcontentdecryptionmodule_impl.h" |
| 83 #include "media/filters/stream_parser_factory.h" | 83 #include "media/filters/stream_parser_factory.h" |
| 84 #include "storage/common/database/database_identifier.h" | 84 #include "storage/common/database/database_identifier.h" |
| 85 #include "storage/common/quota/quota_types.h" | 85 #include "storage/common/quota/quota_types.h" |
| 86 #include "third_party/WebKit/public/platform/FilePathConversion.h" | 86 #include "third_party/WebKit/public/platform/FilePathConversion.h" |
| 87 #include "third_party/WebKit/public/platform/URLConversion.h" | 87 #include "third_party/WebKit/public/platform/URLConversion.h" |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 } | 613 } |
| 614 | 614 |
| 615 bool RendererBlinkPlatformImpl::databaseSetFileSize( | 615 bool RendererBlinkPlatformImpl::databaseSetFileSize( |
| 616 const WebString& vfs_file_name, long long size) { | 616 const WebString& vfs_file_name, long long size) { |
| 617 return DatabaseUtil::DatabaseSetFileSize( | 617 return DatabaseUtil::DatabaseSetFileSize( |
| 618 vfs_file_name, size, sync_message_filter_.get()); | 618 vfs_file_name, size, sync_message_filter_.get()); |
| 619 } | 619 } |
| 620 | 620 |
| 621 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() { | 621 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() { |
| 622 RenderThreadImpl* thread = RenderThreadImpl::current(); | 622 RenderThreadImpl* thread = RenderThreadImpl::current(); |
| 623 GpuChannelHost* host = thread->EstablishGpuChannelSync( | 623 GpuChannelHost* host = |
| 624 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); | 624 thread->EstablishGpuChannelSync(gpu::CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); |
| 625 if (!host) | 625 if (!host) |
| 626 return false; | 626 return false; |
| 627 | 627 |
| 628 return host->gpu_info().SupportsAccelerated2dCanvas(); | 628 return host->gpu_info().SupportsAccelerated2dCanvas(); |
| 629 } | 629 } |
| 630 | 630 |
| 631 bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() { | 631 bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() { |
| 632 RenderThreadImpl* thread = RenderThreadImpl::current(); | 632 RenderThreadImpl* thread = RenderThreadImpl::current(); |
| 633 // thread can be NULL in tests. | 633 // thread can be NULL in tests. |
| 634 return thread && thread->compositor_task_runner().get(); | 634 return thread && thread->compositor_task_runner().get(); |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 blink::WebGraphicsContext3D::WebGraphicsInfo* gl_info) { | 1004 blink::WebGraphicsContext3D::WebGraphicsInfo* 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 NULL; | 1009 return NULL; |
| 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 gpu:: |
| 1015 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIAL
IZE)); |
| 1015 | 1016 |
| 1016 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; | 1017 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; |
| 1017 bool lose_context_when_out_of_memory = false; | 1018 bool lose_context_when_out_of_memory = false; |
| 1018 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 1019 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
| 1019 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( | 1020 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( |
| 1020 gpu_channel_host.get(), | 1021 gpu_channel_host.get(), |
| 1021 attributes, | 1022 attributes, |
| 1022 lose_context_when_out_of_memory, | 1023 lose_context_when_out_of_memory, |
| 1023 blink::WebStringToGURL(attributes.topDocumentURL), | 1024 blink::WebStringToGURL(attributes.topDocumentURL), |
| 1024 limits, | 1025 limits, |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 } | 1265 } |
| 1265 | 1266 |
| 1266 //------------------------------------------------------------------------------ | 1267 //------------------------------------------------------------------------------ |
| 1267 | 1268 |
| 1268 blink::WebTrialTokenValidator* | 1269 blink::WebTrialTokenValidator* |
| 1269 RendererBlinkPlatformImpl::trialTokenValidator() { | 1270 RendererBlinkPlatformImpl::trialTokenValidator() { |
| 1270 return &trial_token_validator_; | 1271 return &trial_token_validator_; |
| 1271 } | 1272 } |
| 1272 | 1273 |
| 1273 } // namespace content | 1274 } // namespace content |
| OLD | NEW |