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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 #include "content/renderer/gpu/compositor_output_surface.h" | 56 #include "content/renderer/gpu/compositor_output_surface.h" |
57 #include "content/renderer/gpu/gpu_benchmarking_extension.h" | 57 #include "content/renderer/gpu/gpu_benchmarking_extension.h" |
58 #include "content/renderer/media/audio_input_message_filter.h" | 58 #include "content/renderer/media/audio_input_message_filter.h" |
59 #include "content/renderer/media/audio_message_filter.h" | 59 #include "content/renderer/media/audio_message_filter.h" |
60 #include "content/renderer/media/audio_renderer_mixer_manager.h" | 60 #include "content/renderer/media/audio_renderer_mixer_manager.h" |
61 #include "content/renderer/media/media_stream_center.h" | 61 #include "content/renderer/media/media_stream_center.h" |
62 #include "content/renderer/media/media_stream_dependency_factory.h" | 62 #include "content/renderer/media/media_stream_dependency_factory.h" |
63 #include "content/renderer/media/peer_connection_tracker.h" | 63 #include "content/renderer/media/peer_connection_tracker.h" |
64 #include "content/renderer/media/video_capture_impl_manager.h" | 64 #include "content/renderer/media/video_capture_impl_manager.h" |
65 #include "content/renderer/media/video_capture_message_filter.h" | 65 #include "content/renderer/media/video_capture_message_filter.h" |
| 66 #include "content/renderer/memory_benchmarking_extension.h" |
66 #include "content/renderer/p2p/socket_dispatcher.h" | 67 #include "content/renderer/p2p/socket_dispatcher.h" |
67 #include "content/renderer/plugin_channel_host.h" | 68 #include "content/renderer/plugin_channel_host.h" |
68 #include "content/renderer/render_process_impl.h" | 69 #include "content/renderer/render_process_impl.h" |
69 #include "content/renderer/render_view_impl.h" | 70 #include "content/renderer/render_view_impl.h" |
70 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 71 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
71 #include "grit/content_resources.h" | 72 #include "grit/content_resources.h" |
72 #include "ipc/ipc_channel_handle.h" | 73 #include "ipc/ipc_channel_handle.h" |
73 #include "ipc/ipc_forwarding_message_filter.h" | 74 #include "ipc/ipc_forwarding_message_filter.h" |
74 #include "ipc/ipc_platform_file.h" | 75 #include "ipc/ipc_platform_file.h" |
75 #include "media/base/audio_hardware_config.h" | 76 #include "media/base/audio_hardware_config.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 AddFilter(audio_message_filter_.get()); | 351 AddFilter(audio_message_filter_.get()); |
351 | 352 |
352 AddFilter(new IndexedDBMessageFilter); | 353 AddFilter(new IndexedDBMessageFilter); |
353 | 354 |
354 GetContentClient()->renderer()->RenderThreadStarted(); | 355 GetContentClient()->renderer()->RenderThreadStarted(); |
355 | 356 |
356 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 357 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
357 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) | 358 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) |
358 RegisterExtension(GpuBenchmarkingExtension::Get()); | 359 RegisterExtension(GpuBenchmarkingExtension::Get()); |
359 | 360 |
| 361 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking)) |
| 362 RegisterExtension(MemoryBenchmarkingExtension::Get()); |
| 363 |
360 context_lost_cb_.reset(new GpuVDAContextLostCallback()); | 364 context_lost_cb_.reset(new GpuVDAContextLostCallback()); |
361 | 365 |
362 // Note that under Linux, the media library will normally already have | 366 // Note that under Linux, the media library will normally already have |
363 // been initialized by the Zygote before this instance became a Renderer. | 367 // been initialized by the Zygote before this instance became a Renderer. |
364 FilePath media_path; | 368 FilePath media_path; |
365 PathService::Get(DIR_MEDIA_LIBS, &media_path); | 369 PathService::Get(DIR_MEDIA_LIBS, &media_path); |
366 if (!media_path.empty()) | 370 if (!media_path.empty()) |
367 media::InitializeMediaLibrary(media_path); | 371 media::InitializeMediaLibrary(media_path); |
368 | 372 |
369 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); | 373 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 | 1196 |
1193 void RenderThreadImpl::SetFlingCurveParameters( | 1197 void RenderThreadImpl::SetFlingCurveParameters( |
1194 const std::vector<float>& new_touchpad, | 1198 const std::vector<float>& new_touchpad, |
1195 const std::vector<float>& new_touchscreen) { | 1199 const std::vector<float>& new_touchscreen) { |
1196 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1200 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
1197 new_touchscreen); | 1201 new_touchscreen); |
1198 | 1202 |
1199 } | 1203 } |
1200 | 1204 |
1201 } // namespace content | 1205 } // namespace content |
OLD | NEW |