| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 383 |
| 384 GetContentClient()->renderer()->RenderThreadStarted(); | 384 GetContentClient()->renderer()->RenderThreadStarted(); |
| 385 | 385 |
| 386 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 386 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 387 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) | 387 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) |
| 388 RegisterExtension(GpuBenchmarkingExtension::Get()); | 388 RegisterExtension(GpuBenchmarkingExtension::Get()); |
| 389 | 389 |
| 390 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 390 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 391 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking)) | 391 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking)) |
| 392 RegisterExtension(MemoryBenchmarkingExtension::Get()); | 392 RegisterExtension(MemoryBenchmarkingExtension::Get()); |
| 393 trace_memory_controller_.reset(new base::debug::TraceMemoryController( |
| 394 GetMessageLoop()->message_loop_proxy())); |
| 393 #endif // USE_TCMALLOC | 395 #endif // USE_TCMALLOC |
| 394 | 396 |
| 395 if (command_line.HasSwitch(switches::kEnableSkiaBenchmarking)) { | 397 if (command_line.HasSwitch(switches::kEnableSkiaBenchmarking)) { |
| 396 LOG(WARNING) << "Enabling unsafe Skia benchmarking extension."; | 398 LOG(WARNING) << "Enabling unsafe Skia benchmarking extension."; |
| 397 RegisterExtension(SkiaBenchmarkingExtension::Get()); | 399 RegisterExtension(SkiaBenchmarkingExtension::Get()); |
| 398 } | 400 } |
| 399 | 401 |
| 400 context_lost_cb_.reset(new GpuVDAContextLostCallback()); | 402 context_lost_cb_.reset(new GpuVDAContextLostCallback()); |
| 401 | 403 |
| 402 // Note that under Linux, the media library will normally already have | 404 // Note that under Linux, the media library will normally already have |
| (...skipping 16 matching lines...) Expand all Loading... |
| 419 // Wait for all databases to be closed. | 421 // Wait for all databases to be closed. |
| 420 if (web_database_observer_impl_) | 422 if (web_database_observer_impl_) |
| 421 web_database_observer_impl_->WaitForAllDatabasesToClose(); | 423 web_database_observer_impl_->WaitForAllDatabasesToClose(); |
| 422 | 424 |
| 423 // Shutdown in reverse of the initialization order. | 425 // Shutdown in reverse of the initialization order. |
| 424 if (devtools_agent_message_filter_.get()) { | 426 if (devtools_agent_message_filter_.get()) { |
| 425 RemoveFilter(devtools_agent_message_filter_.get()); | 427 RemoveFilter(devtools_agent_message_filter_.get()); |
| 426 devtools_agent_message_filter_ = NULL; | 428 devtools_agent_message_filter_ = NULL; |
| 427 } | 429 } |
| 428 | 430 |
| 431 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 432 trace_memory_controller_.reset(); |
| 433 #endif |
| 434 |
| 429 RemoveFilter(audio_input_message_filter_.get()); | 435 RemoveFilter(audio_input_message_filter_.get()); |
| 430 audio_input_message_filter_ = NULL; | 436 audio_input_message_filter_ = NULL; |
| 431 | 437 |
| 432 RemoveFilter(audio_message_filter_.get()); | 438 RemoveFilter(audio_message_filter_.get()); |
| 433 audio_message_filter_ = NULL; | 439 audio_message_filter_ = NULL; |
| 434 | 440 |
| 435 RemoveFilter(vc_manager_->video_capture_message_filter()); | 441 RemoveFilter(vc_manager_->video_capture_message_filter()); |
| 436 | 442 |
| 437 RemoveFilter(db_message_filter_.get()); | 443 RemoveFilter(db_message_filter_.get()); |
| 438 db_message_filter_ = NULL; | 444 db_message_filter_ = NULL; |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 | 1265 |
| 1260 void RenderThreadImpl::SetFlingCurveParameters( | 1266 void RenderThreadImpl::SetFlingCurveParameters( |
| 1261 const std::vector<float>& new_touchpad, | 1267 const std::vector<float>& new_touchpad, |
| 1262 const std::vector<float>& new_touchscreen) { | 1268 const std::vector<float>& new_touchscreen) { |
| 1263 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1269 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
| 1264 new_touchscreen); | 1270 new_touchscreen); |
| 1265 | 1271 |
| 1266 } | 1272 } |
| 1267 | 1273 |
| 1268 } // namespace content | 1274 } // namespace content |
| OLD | NEW |