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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 | 395 |
396 GetContentClient()->renderer()->RenderThreadStarted(); | 396 GetContentClient()->renderer()->RenderThreadStarted(); |
397 | 397 |
398 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 398 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
399 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) | 399 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) |
400 RegisterExtension(GpuBenchmarkingExtension::Get()); | 400 RegisterExtension(GpuBenchmarkingExtension::Get()); |
401 | 401 |
402 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 402 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
403 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking)) | 403 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking)) |
404 RegisterExtension(MemoryBenchmarkingExtension::Get()); | 404 RegisterExtension(MemoryBenchmarkingExtension::Get()); |
| 405 trace_memory_observer_.reset(new base::debug::TraceMemoryTraceLogObserver( |
| 406 GetMessageLoop()->message_loop_proxy())); |
405 #endif // USE_TCMALLOC | 407 #endif // USE_TCMALLOC |
406 | 408 |
407 if (command_line.HasSwitch(switches::kEnableSkiaBenchmarking)) { | 409 if (command_line.HasSwitch(switches::kEnableSkiaBenchmarking)) { |
408 LOG(WARNING) << "Enabling unsafe Skia benchmarking extension."; | 410 LOG(WARNING) << "Enabling unsafe Skia benchmarking extension."; |
409 RegisterExtension(SkiaBenchmarkingExtension::Get()); | 411 RegisterExtension(SkiaBenchmarkingExtension::Get()); |
410 } | 412 } |
411 | 413 |
412 context_lost_cb_.reset(new GpuVDAContextLostCallback()); | 414 context_lost_cb_.reset(new GpuVDAContextLostCallback()); |
413 | 415 |
414 // Note that under Linux, the media library will normally already have | 416 // Note that under Linux, the media library will normally already have |
(...skipping 16 matching lines...) Expand all Loading... |
431 // Wait for all databases to be closed. | 433 // Wait for all databases to be closed. |
432 if (web_database_observer_impl_) | 434 if (web_database_observer_impl_) |
433 web_database_observer_impl_->WaitForAllDatabasesToClose(); | 435 web_database_observer_impl_->WaitForAllDatabasesToClose(); |
434 | 436 |
435 // Shutdown in reverse of the initialization order. | 437 // Shutdown in reverse of the initialization order. |
436 if (devtools_agent_message_filter_.get()) { | 438 if (devtools_agent_message_filter_.get()) { |
437 RemoveFilter(devtools_agent_message_filter_.get()); | 439 RemoveFilter(devtools_agent_message_filter_.get()); |
438 devtools_agent_message_filter_ = NULL; | 440 devtools_agent_message_filter_ = NULL; |
439 } | 441 } |
440 | 442 |
| 443 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 444 trace_memory_observer_.reset(); |
| 445 #endif |
| 446 |
441 RemoveFilter(audio_input_message_filter_.get()); | 447 RemoveFilter(audio_input_message_filter_.get()); |
442 audio_input_message_filter_ = NULL; | 448 audio_input_message_filter_ = NULL; |
443 | 449 |
444 RemoveFilter(audio_message_filter_.get()); | 450 RemoveFilter(audio_message_filter_.get()); |
445 audio_message_filter_ = NULL; | 451 audio_message_filter_ = NULL; |
446 | 452 |
447 RemoveFilter(vc_manager_->video_capture_message_filter()); | 453 RemoveFilter(vc_manager_->video_capture_message_filter()); |
448 | 454 |
449 RemoveFilter(db_message_filter_.get()); | 455 RemoveFilter(db_message_filter_.get()); |
450 db_message_filter_ = NULL; | 456 db_message_filter_ = NULL; |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 | 1258 |
1253 void RenderThreadImpl::SetFlingCurveParameters( | 1259 void RenderThreadImpl::SetFlingCurveParameters( |
1254 const std::vector<float>& new_touchpad, | 1260 const std::vector<float>& new_touchpad, |
1255 const std::vector<float>& new_touchscreen) { | 1261 const std::vector<float>& new_touchscreen) { |
1256 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1262 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
1257 new_touchscreen); | 1263 new_touchscreen); |
1258 | 1264 |
1259 } | 1265 } |
1260 | 1266 |
1261 } // namespace content | 1267 } // namespace content |
OLD | NEW |