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 16 matching lines...) Expand all Loading... |
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/npobject_util.h" | 32 #include "content/child/npobject_util.h" |
33 #include "content/child/plugin_messages.h" | 33 #include "content/child/plugin_messages.h" |
34 #include "content/child/resource_dispatcher.h" | 34 #include "content/child/resource_dispatcher.h" |
35 #include "content/child/runtime_features.h" | 35 #include "content/child/runtime_features.h" |
36 #include "content/child/web_database_observer_impl.h" | 36 #include "content/child/web_database_observer_impl.h" |
| 37 #include "content/common/content_constants_internal.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" |
42 #include "content/common/gpu/client/gpu_channel_host.h" | 43 #include "content/common/gpu/client/gpu_channel_host.h" |
43 #include "content/common/gpu/gpu_messages.h" | 44 #include "content/common/gpu/gpu_messages.h" |
44 #include "content/common/resource_messages.h" | 45 #include "content/common/resource_messages.h" |
45 #include "content/common/view_messages.h" | 46 #include "content/common/view_messages.h" |
46 #include "content/public/common/content_constants.h" | 47 #include "content/public/common/content_constants.h" |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 } | 302 } |
302 | 303 |
303 RenderThreadImpl::RenderThreadImpl(const std::string& channel_name) | 304 RenderThreadImpl::RenderThreadImpl(const std::string& channel_name) |
304 : ChildThread(channel_name) { | 305 : ChildThread(channel_name) { |
305 Init(); | 306 Init(); |
306 } | 307 } |
307 | 308 |
308 void RenderThreadImpl::Init() { | 309 void RenderThreadImpl::Init() { |
309 TRACE_EVENT_BEGIN_ETW("RenderThreadImpl::Init", 0, ""); | 310 TRACE_EVENT_BEGIN_ETW("RenderThreadImpl::Init", 0, ""); |
310 | 311 |
| 312 base::debug::TraceLog::GetInstance()->SetThreadSortIndex( |
| 313 base::PlatformThread::CurrentId(), |
| 314 kTraceEventRendererMainThreadSortIndex); |
| 315 |
311 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); | 316 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); |
312 v8::V8::SetCreateHistogramFunction(CreateHistogram); | 317 v8::V8::SetCreateHistogramFunction(CreateHistogram); |
313 v8::V8::SetAddHistogramSampleFunction(AddHistogramSample); | 318 v8::V8::SetAddHistogramSampleFunction(AddHistogramSample); |
314 | 319 |
315 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 320 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
316 // On Mac and Android, the select popups are rendered by the browser. | 321 // On Mac and Android, the select popups are rendered by the browser. |
317 WebKit::WebView::setUseExternalPopupMenus(true); | 322 WebKit::WebView::setUseExternalPopupMenus(true); |
318 #endif | 323 #endif |
319 | 324 |
320 lazy_tls.Pointer()->Set(this); | 325 lazy_tls.Pointer()->Set(this); |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 | 1237 |
1233 void RenderThreadImpl::SetFlingCurveParameters( | 1238 void RenderThreadImpl::SetFlingCurveParameters( |
1234 const std::vector<float>& new_touchpad, | 1239 const std::vector<float>& new_touchpad, |
1235 const std::vector<float>& new_touchscreen) { | 1240 const std::vector<float>& new_touchscreen) { |
1236 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1241 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
1237 new_touchscreen); | 1242 new_touchscreen); |
1238 | 1243 |
1239 } | 1244 } |
1240 | 1245 |
1241 } // namespace content | 1246 } // namespace content |
OLD | NEW |