| 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/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 #include "content/renderer/gpu/gpu_benchmarking_extension.h" | 62 #include "content/renderer/gpu/gpu_benchmarking_extension.h" |
| 63 #include "content/renderer/gpu/input_event_filter.h" | 63 #include "content/renderer/gpu/input_event_filter.h" |
| 64 #include "content/renderer/gpu/input_handler_manager.h" | 64 #include "content/renderer/gpu/input_handler_manager.h" |
| 65 #include "content/renderer/media/audio_input_message_filter.h" | 65 #include "content/renderer/media/audio_input_message_filter.h" |
| 66 #include "content/renderer/media/audio_message_filter.h" | 66 #include "content/renderer/media/audio_message_filter.h" |
| 67 #include "content/renderer/media/audio_renderer_mixer_manager.h" | 67 #include "content/renderer/media/audio_renderer_mixer_manager.h" |
| 68 #include "content/renderer/media/media_stream_center.h" | 68 #include "content/renderer/media/media_stream_center.h" |
| 69 #include "content/renderer/media/media_stream_dependency_factory.h" | 69 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 70 #include "content/renderer/media/midi_message_filter.h" | 70 #include "content/renderer/media/midi_message_filter.h" |
| 71 #include "content/renderer/media/peer_connection_tracker.h" | 71 #include "content/renderer/media/peer_connection_tracker.h" |
| 72 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h" |
| 72 #include "content/renderer/media/video_capture_impl_manager.h" | 73 #include "content/renderer/media/video_capture_impl_manager.h" |
| 73 #include "content/renderer/media/video_capture_message_filter.h" | 74 #include "content/renderer/media/video_capture_message_filter.h" |
| 74 #include "content/renderer/media/webrtc_identity_service.h" | 75 #include "content/renderer/media/webrtc_identity_service.h" |
| 75 #include "content/renderer/memory_benchmarking_extension.h" | 76 #include "content/renderer/memory_benchmarking_extension.h" |
| 76 #include "content/renderer/p2p/socket_dispatcher.h" | 77 #include "content/renderer/p2p/socket_dispatcher.h" |
| 77 #include "content/renderer/plugin_channel_host.h" | 78 #include "content/renderer/plugin_channel_host.h" |
| 78 #include "content/renderer/render_process_impl.h" | 79 #include "content/renderer/render_process_impl.h" |
| 79 #include "content/renderer/render_process_visibility_manager.h" | 80 #include "content/renderer/render_process_visibility_manager.h" |
| 80 #include "content/renderer/render_view_impl.h" | 81 #include "content/renderer/render_view_impl.h" |
| 81 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 82 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
| 82 #include "content/renderer/skia_benchmarking_extension.h" | 83 #include "content/renderer/skia_benchmarking_extension.h" |
| 83 #include "grit/content_resources.h" | 84 #include "grit/content_resources.h" |
| 84 #include "ipc/ipc_channel_handle.h" | 85 #include "ipc/ipc_channel_handle.h" |
| 85 #include "ipc/ipc_forwarding_message_filter.h" | 86 #include "ipc/ipc_forwarding_message_filter.h" |
| 86 #include "ipc/ipc_platform_file.h" | 87 #include "ipc/ipc_platform_file.h" |
| 87 #include "media/base/audio_hardware_config.h" | 88 #include "media/base/audio_hardware_config.h" |
| 88 #include "media/base/media.h" | 89 #include "media/base/media.h" |
| 89 #include "media/filters/gpu_video_decoder_factories.h" | 90 #include "media/filters/gpu_video_accelerator_factories.h" |
| 90 #include "net/base/net_errors.h" | 91 #include "net/base/net_errors.h" |
| 91 #include "net/base/net_util.h" | 92 #include "net/base/net_util.h" |
| 92 #include "third_party/WebKit/public/platform/WebString.h" | 93 #include "third_party/WebKit/public/platform/WebString.h" |
| 93 #include "third_party/WebKit/public/web/WebColorName.h" | 94 #include "third_party/WebKit/public/web/WebColorName.h" |
| 94 #include "third_party/WebKit/public/web/WebDatabase.h" | 95 #include "third_party/WebKit/public/web/WebDatabase.h" |
| 95 #include "third_party/WebKit/public/web/WebDocument.h" | 96 #include "third_party/WebKit/public/web/WebDocument.h" |
| 96 #include "third_party/WebKit/public/web/WebFrame.h" | 97 #include "third_party/WebKit/public/web/WebFrame.h" |
| 97 #include "third_party/WebKit/public/web/WebImageCache.h" | 98 #include "third_party/WebKit/public/web/WebImageCache.h" |
| 98 #include "third_party/WebKit/public/web/WebKit.h" | 99 #include "third_party/WebKit/public/web/WebKit.h" |
| 99 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" | 100 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 bool RenderThreadImpl::ResolveProxy(const GURL& url, std::string* proxy_list) { | 872 bool RenderThreadImpl::ResolveProxy(const GURL& url, std::string* proxy_list) { |
| 872 bool result = false; | 873 bool result = false; |
| 873 Send(new ViewHostMsg_ResolveProxy(url, &result, proxy_list)); | 874 Send(new ViewHostMsg_ResolveProxy(url, &result, proxy_list)); |
| 874 return result; | 875 return result; |
| 875 } | 876 } |
| 876 | 877 |
| 877 void RenderThreadImpl::PostponeIdleNotification() { | 878 void RenderThreadImpl::PostponeIdleNotification() { |
| 878 idle_notifications_to_skip_ = 2; | 879 idle_notifications_to_skip_ = 2; |
| 879 } | 880 } |
| 880 | 881 |
| 881 scoped_refptr<RendererGpuVideoDecoderFactories> | 882 scoped_refptr<media::GpuVideoAcceleratorFactories> |
| 882 RenderThreadImpl::GetGpuFactories( | 883 RenderThreadImpl::GetGpuFactories( |
| 883 const scoped_refptr<base::MessageLoopProxy>& factories_loop) { | 884 const scoped_refptr<base::MessageLoopProxy>& factories_loop) { |
| 884 DCHECK(IsMainThread()); | 885 DCHECK(IsMainThread()); |
| 885 | 886 |
| 886 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 887 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 887 scoped_refptr<RendererGpuVideoDecoderFactories> gpu_factories; | 888 scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories; |
| 888 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; | 889 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; |
| 889 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) | 890 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) |
| 890 context3d = GetGpuVDAContext3D(); | 891 context3d = GetGpuVDAContext3D(); |
| 891 if (context3d) { | 892 GpuChannelHost* gpu_channel_host = GetGpuChannel(); |
| 892 GpuChannelHost* gpu_channel_host = GetGpuChannel(); | 893 if (gpu_channel_host) { |
| 893 if (gpu_channel_host) { | 894 gpu_factories = new RendererGpuVideoAcceleratorFactories( |
| 894 gpu_factories = new RendererGpuVideoDecoderFactories( | 895 gpu_channel_host, factories_loop, context3d); |
| 895 gpu_channel_host, factories_loop, context3d); | |
| 896 } | |
| 897 } | 896 } |
| 898 return gpu_factories; | 897 return gpu_factories; |
| 899 } | 898 } |
| 900 | 899 |
| 901 /* static */ | 900 /* static */ |
| 902 void RenderThreadImpl::OnGpuVDAContextLoss() { | 901 void RenderThreadImpl::OnGpuVDAContextLoss() { |
| 903 RenderThreadImpl* self = RenderThreadImpl::current(); | 902 RenderThreadImpl* self = RenderThreadImpl::current(); |
| 904 DCHECK(self); | 903 DCHECK(self); |
| 905 if (!self->gpu_vda_context3d_) | 904 if (!self->gpu_vda_context3d_) |
| 906 return; | 905 return; |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1297 | 1296 |
| 1298 void RenderThreadImpl::SetFlingCurveParameters( | 1297 void RenderThreadImpl::SetFlingCurveParameters( |
| 1299 const std::vector<float>& new_touchpad, | 1298 const std::vector<float>& new_touchpad, |
| 1300 const std::vector<float>& new_touchscreen) { | 1299 const std::vector<float>& new_touchscreen) { |
| 1301 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1300 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
| 1302 new_touchscreen); | 1301 new_touchscreen); |
| 1303 | 1302 |
| 1304 } | 1303 } |
| 1305 | 1304 |
| 1306 } // namespace content | 1305 } // namespace content |
| OLD | NEW |