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_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
12 #include "base/shared_memory.h" | 12 #include "base/shared_memory.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "content/common/database_util.h" | 14 #include "content/common/database_util.h" |
15 #include "content/common/file_utilities_messages.h" | 15 #include "content/common/file_utilities_messages.h" |
16 #include "content/common/fileapi/webblobregistry_impl.h" | 16 #include "content/common/fileapi/webblobregistry_impl.h" |
17 #include "content/common/fileapi/webfilesystem_impl.h" | 17 #include "content/common/fileapi/webfilesystem_impl.h" |
18 #include "content/common/gpu/client/context_provider_command_buffer.h" | 18 #include "content/common/gpu/client/context_provider_command_buffer.h" |
19 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 19 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
20 #include "content/common/indexed_db/proxy_webidbfactory_impl.h" | 20 #include "content/common/indexed_db/proxy_webidbfactory_impl.h" |
21 #include "content/common/mime_registry_messages.h" | 21 #include "content/common/mime_registry_messages.h" |
22 #include "content/common/npobject_util.h" | 22 #include "content/common/npobject_util.h" |
23 #include "content/common/thread_safe_sender.h" | 23 #include "content/common/thread_safe_sender.h" |
24 #include "content/common/view_messages.h" | 24 #include "content/common/view_messages.h" |
25 #include "content/common/webmessageportchannel_impl.h" | 25 #include "content/common/webmessageportchannel_impl.h" |
26 #include "content/public/common/content_switches.h" | 26 #include "content/public/common/content_switches.h" |
27 #include "content/public/common/gpu_info.h" | |
28 #include "content/public/renderer/content_renderer_client.h" | 27 #include "content/public/renderer/content_renderer_client.h" |
29 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 28 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
30 #include "content/renderer/gamepad_shared_memory_reader.h" | 29 #include "content/renderer/gamepad_shared_memory_reader.h" |
31 #include "content/renderer/hyphenator/hyphenator.h" | 30 #include "content/renderer/hyphenator/hyphenator.h" |
32 #include "content/renderer/media/media_stream_dependency_factory.h" | 31 #include "content/renderer/media/media_stream_dependency_factory.h" |
33 #include "content/renderer/media/renderer_webaudiodevice_impl.h" | 32 #include "content/renderer/media/renderer_webaudiodevice_impl.h" |
34 #include "content/renderer/render_thread_impl.h" | 33 #include "content/renderer/render_thread_impl.h" |
35 #include "content/renderer/renderer_clipboard_client.h" | 34 #include "content/renderer/renderer_clipboard_client.h" |
36 #include "content/renderer/websharedworkerrepository_impl.h" | 35 #include "content/renderer/websharedworkerrepository_impl.h" |
37 #include "googleurl/src/gurl.h" | 36 #include "googleurl/src/gurl.h" |
| 37 #include "gpu/config/gpu_info.h" |
38 #include "ipc/ipc_sync_message_filter.h" | 38 #include "ipc/ipc_sync_message_filter.h" |
39 #include "media/audio/audio_output_device.h" | 39 #include "media/audio/audio_output_device.h" |
40 #include "media/base/audio_hardware_config.h" | 40 #include "media/base/audio_hardware_config.h" |
41 #include "third_party/WebKit/Source/Platform/chromium/public/WebBlobRegistry.h" | 41 #include "third_party/WebKit/Source/Platform/chromium/public/WebBlobRegistry.h" |
42 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileInfo.h" | 42 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileInfo.h" |
43 #include "third_party/WebKit/Source/Platform/chromium/public/WebGamepads.h" | 43 #include "third_party/WebKit/Source/Platform/chromium/public/WebGamepads.h" |
44 #include "third_party/WebKit/Source/Platform/chromium/public/WebHyphenator.h" | 44 #include "third_party/WebKit/Source/Platform/chromium/public/WebHyphenator.h" |
45 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamCente
r.h" | 45 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamCente
r.h" |
46 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamCente
rClient.h" | 46 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamCente
rClient.h" |
47 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" | 47 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 } | 612 } |
613 } | 613 } |
614 | 614 |
615 bool RendererWebKitPlatformSupportImpl::canAccelerate2dCanvas() { | 615 bool RendererWebKitPlatformSupportImpl::canAccelerate2dCanvas() { |
616 RenderThreadImpl* thread = RenderThreadImpl::current(); | 616 RenderThreadImpl* thread = RenderThreadImpl::current(); |
617 GpuChannelHost* host = thread->EstablishGpuChannelSync( | 617 GpuChannelHost* host = thread->EstablishGpuChannelSync( |
618 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); | 618 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); |
619 if (!host) | 619 if (!host) |
620 return false; | 620 return false; |
621 | 621 |
622 const GPUInfo& gpu_info = host->gpu_info(); | 622 const gpu::GPUInfo& gpu_info = host->gpu_info(); |
623 if (gpu_info.can_lose_context || gpu_info.software_rendering) | 623 if (gpu_info.can_lose_context || gpu_info.software_rendering) |
624 return false; | 624 return false; |
625 | 625 |
626 return true; | 626 return true; |
627 } | 627 } |
628 | 628 |
629 bool RendererWebKitPlatformSupportImpl::isThreadedCompositingEnabled() { | 629 bool RendererWebKitPlatformSupportImpl::isThreadedCompositingEnabled() { |
630 return !!RenderThreadImpl::current()->compositor_message_loop_proxy(); | 630 return !!RenderThreadImpl::current()->compositor_message_loop_proxy(); |
631 } | 631 } |
632 | 632 |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 } | 897 } |
898 | 898 |
899 //------------------------------------------------------------------------------ | 899 //------------------------------------------------------------------------------ |
900 | 900 |
901 WebKit::WebCompositorSupport* | 901 WebKit::WebCompositorSupport* |
902 RendererWebKitPlatformSupportImpl::compositorSupport() { | 902 RendererWebKitPlatformSupportImpl::compositorSupport() { |
903 return &compositor_support_; | 903 return &compositor_support_; |
904 } | 904 } |
905 | 905 |
906 } // namespace content | 906 } // namespace content |
OLD | NEW |