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 11 matching lines...) Expand all Loading... |
22 #include "base/strings/string16.h" | 22 #include "base/strings/string16.h" |
23 #include "base/strings/string_number_conversions.h" // Temporary | 23 #include "base/strings/string_number_conversions.h" // Temporary |
24 #include "base/strings/utf_string_conversions.h" | 24 #include "base/strings/utf_string_conversions.h" |
25 #include "base/threading/thread_local.h" | 25 #include "base/threading/thread_local.h" |
26 #include "base/threading/thread_restrictions.h" | 26 #include "base/threading/thread_restrictions.h" |
27 #include "base/values.h" | 27 #include "base/values.h" |
28 #include "content/child/appcache_dispatcher.h" | 28 #include "content/child/appcache_dispatcher.h" |
29 #include "content/child/child_histogram_message_filter.h" | 29 #include "content/child/child_histogram_message_filter.h" |
30 #include "content/child/indexed_db/indexed_db_dispatcher.h" | 30 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
31 #include "content/child/indexed_db/indexed_db_message_filter.h" | 31 #include "content/child/indexed_db/indexed_db_message_filter.h" |
| 32 #include "content/child/memory_pressure_message_filter.h" |
32 #include "content/child/npobject_util.h" | 33 #include "content/child/npobject_util.h" |
33 #include "content/child/plugin_messages.h" | 34 #include "content/child/plugin_messages.h" |
34 #include "content/child/resource_dispatcher.h" | 35 #include "content/child/resource_dispatcher.h" |
35 #include "content/child/runtime_features.h" | 36 #include "content/child/runtime_features.h" |
36 #include "content/child/web_database_observer_impl.h" | 37 #include "content/child/web_database_observer_impl.h" |
37 #include "content/common/child_process_messages.h" | 38 #include "content/common/child_process_messages.h" |
38 #include "content/common/database_messages.h" | 39 #include "content/common/database_messages.h" |
39 #include "content/common/db_message_filter.h" | 40 #include "content/common/db_message_filter.h" |
40 #include "content/common/dom_storage_messages.h" | 41 #include "content/common/dom_storage_messages.h" |
41 #include "content/common/gpu/client/context_provider_command_buffer.h" | 42 #include "content/common/gpu/client/context_provider_command_buffer.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 AddFilter(vc_manager_->video_capture_message_filter()); | 361 AddFilter(vc_manager_->video_capture_message_filter()); |
361 | 362 |
362 audio_input_message_filter_ = | 363 audio_input_message_filter_ = |
363 new AudioInputMessageFilter(GetIOMessageLoopProxy()); | 364 new AudioInputMessageFilter(GetIOMessageLoopProxy()); |
364 AddFilter(audio_input_message_filter_.get()); | 365 AddFilter(audio_input_message_filter_.get()); |
365 | 366 |
366 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); | 367 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); |
367 AddFilter(audio_message_filter_.get()); | 368 AddFilter(audio_message_filter_.get()); |
368 | 369 |
369 AddFilter(new IndexedDBMessageFilter); | 370 AddFilter(new IndexedDBMessageFilter); |
| 371 AddFilter(new MemoryPressureMessageFilter); |
370 | 372 |
371 GetContentClient()->renderer()->RenderThreadStarted(); | 373 GetContentClient()->renderer()->RenderThreadStarted(); |
372 | 374 |
373 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 375 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
374 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) | 376 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) |
375 RegisterExtension(GpuBenchmarkingExtension::Get()); | 377 RegisterExtension(GpuBenchmarkingExtension::Get()); |
376 | 378 |
377 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 379 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
378 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking)) | 380 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking)) |
379 RegisterExtension(MemoryBenchmarkingExtension::Get()); | 381 RegisterExtension(MemoryBenchmarkingExtension::Get()); |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 | 1234 |
1233 void RenderThreadImpl::SetFlingCurveParameters( | 1235 void RenderThreadImpl::SetFlingCurveParameters( |
1234 const std::vector<float>& new_touchpad, | 1236 const std::vector<float>& new_touchpad, |
1235 const std::vector<float>& new_touchscreen) { | 1237 const std::vector<float>& new_touchscreen) { |
1236 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1238 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
1237 new_touchscreen); | 1239 new_touchscreen); |
1238 | 1240 |
1239 } | 1241 } |
1240 | 1242 |
1241 } // namespace content | 1243 } // namespace content |
OLD | NEW |