| 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 18 matching lines...) Expand all Loading... |
| 29 #include "content/child/appcache_dispatcher.h" | 29 #include "content/child/appcache_dispatcher.h" |
| 30 #include "content/child/child_histogram_message_filter.h" | 30 #include "content/child/child_histogram_message_filter.h" |
| 31 #include "content/child/indexed_db/indexed_db_dispatcher.h" | 31 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
| 32 #include "content/child/indexed_db/indexed_db_message_filter.h" | 32 #include "content/child/indexed_db/indexed_db_message_filter.h" |
| 33 #include "content/child/npobject_util.h" | 33 #include "content/child/npobject_util.h" |
| 34 #include "content/child/plugin_messages.h" | 34 #include "content/child/plugin_messages.h" |
| 35 #include "content/child/resource_dispatcher.h" | 35 #include "content/child/resource_dispatcher.h" |
| 36 #include "content/child/runtime_features.h" | 36 #include "content/child/runtime_features.h" |
| 37 #include "content/child/thread_safe_sender.h" | 37 #include "content/child/thread_safe_sender.h" |
| 38 #include "content/child/web_database_observer_impl.h" | 38 #include "content/child/web_database_observer_impl.h" |
| 39 #include "content/common/content_constants_internal.h" |
| 39 #include "content/common/child_process_messages.h" | 40 #include "content/common/child_process_messages.h" |
| 40 #include "content/common/database_messages.h" | 41 #include "content/common/database_messages.h" |
| 41 #include "content/common/db_message_filter.h" | 42 #include "content/common/db_message_filter.h" |
| 42 #include "content/common/dom_storage_messages.h" | 43 #include "content/common/dom_storage_messages.h" |
| 43 #include "content/common/gpu/client/context_provider_command_buffer.h" | 44 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 44 #include "content/common/gpu/client/gpu_channel_host.h" | 45 #include "content/common/gpu/client/gpu_channel_host.h" |
| 45 #include "content/common/gpu/gpu_messages.h" | 46 #include "content/common/gpu/gpu_messages.h" |
| 46 #include "content/common/resource_messages.h" | 47 #include "content/common/resource_messages.h" |
| 47 #include "content/common/view_messages.h" | 48 #include "content/common/view_messages.h" |
| 48 #include "content/public/common/content_constants.h" | 49 #include "content/public/common/content_constants.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 } | 310 } |
| 310 | 311 |
| 311 RenderThreadImpl::RenderThreadImpl(const std::string& channel_name) | 312 RenderThreadImpl::RenderThreadImpl(const std::string& channel_name) |
| 312 : ChildThread(channel_name) { | 313 : ChildThread(channel_name) { |
| 313 Init(); | 314 Init(); |
| 314 } | 315 } |
| 315 | 316 |
| 316 void RenderThreadImpl::Init() { | 317 void RenderThreadImpl::Init() { |
| 317 TRACE_EVENT_BEGIN_ETW("RenderThreadImpl::Init", 0, ""); | 318 TRACE_EVENT_BEGIN_ETW("RenderThreadImpl::Init", 0, ""); |
| 318 | 319 |
| 320 base::debug::TraceLog::GetInstance()->SetThreadSortIndex( |
| 321 base::PlatformThread::CurrentId(), |
| 322 kTraceEventRendererMainThreadSortIndex); |
| 323 |
| 319 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); | 324 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); |
| 320 v8::V8::SetCreateHistogramFunction(CreateHistogram); | 325 v8::V8::SetCreateHistogramFunction(CreateHistogram); |
| 321 v8::V8::SetAddHistogramSampleFunction(AddHistogramSample); | 326 v8::V8::SetAddHistogramSampleFunction(AddHistogramSample); |
| 322 | 327 |
| 323 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 328 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 324 // On Mac and Android, the select popups are rendered by the browser. | 329 // On Mac and Android, the select popups are rendered by the browser. |
| 325 WebKit::WebView::setUseExternalPopupMenus(true); | 330 WebKit::WebView::setUseExternalPopupMenus(true); |
| 326 #endif | 331 #endif |
| 327 | 332 |
| 328 lazy_tls.Pointer()->Set(this); | 333 lazy_tls.Pointer()->Set(this); |
| (...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 | 1264 |
| 1260 void RenderThreadImpl::SetFlingCurveParameters( | 1265 void RenderThreadImpl::SetFlingCurveParameters( |
| 1261 const std::vector<float>& new_touchpad, | 1266 const std::vector<float>& new_touchpad, |
| 1262 const std::vector<float>& new_touchscreen) { | 1267 const std::vector<float>& new_touchscreen) { |
| 1263 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1268 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
| 1264 new_touchscreen); | 1269 new_touchscreen); |
| 1265 | 1270 |
| 1266 } | 1271 } |
| 1267 | 1272 |
| 1268 } // namespace content | 1273 } // namespace content |
| OLD | NEW |