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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 base::Histogram::kUmaTargetedHistogramFlag); | 200 base::Histogram::kUmaTargetedHistogramFlag); |
201 return histogram; | 201 return histogram; |
202 } | 202 } |
203 | 203 |
204 void AddHistogramSample(void* hist, int sample) { | 204 void AddHistogramSample(void* hist, int sample) { |
205 base::Histogram* histogram = static_cast<base::Histogram*>(hist); | 205 base::Histogram* histogram = static_cast<base::Histogram*>(hist); |
206 histogram->Add(sample); | 206 histogram->Add(sample); |
207 } | 207 } |
208 | 208 |
209 #if defined(ENABLE_WEBRTC) | 209 #if defined(ENABLE_WEBRTC) |
210 const unsigned char* GetCategoryEnabled(const char* name) { | 210 const unsigned char* GetCategoryGroupEnabled(const char* category_group) { |
211 return TRACE_EVENT_API_GET_CATEGORY_ENABLED(name); | 211 return TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category_group); |
212 } | 212 } |
213 | 213 |
214 void AddTraceEvent(char phase, | 214 void AddTraceEvent(char phase, |
215 const unsigned char* category_enabled, | 215 const unsigned char* category_group_enabled, |
216 const char* name, | 216 const char* name, |
217 unsigned long long id, | 217 unsigned long long id, |
218 int num_args, | 218 int num_args, |
219 const char** arg_names, | 219 const char** arg_names, |
220 const unsigned char* arg_types, | 220 const unsigned char* arg_types, |
221 const unsigned long long* arg_values, | 221 const unsigned long long* arg_values, |
222 unsigned char flags) { | 222 unsigned char flags) { |
223 TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_enabled, name, id, num_args, | 223 TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_group_enabled, name, id, |
224 arg_names, arg_types, arg_values, flags); | 224 num_args, arg_names, arg_types, arg_values, |
| 225 flags); |
225 } | 226 } |
226 #endif | 227 #endif |
227 | 228 |
228 } // namespace | 229 } // namespace |
229 | 230 |
230 class RenderThreadImpl::GpuVDAContextLostCallback | 231 class RenderThreadImpl::GpuVDAContextLostCallback |
231 : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { | 232 : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { |
232 public: | 233 public: |
233 GpuVDAContextLostCallback() {} | 234 GpuVDAContextLostCallback() {} |
234 virtual ~GpuVDAContextLostCallback() {} | 235 virtual ~GpuVDAContextLostCallback() {} |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 appcache_dispatcher_.reset(new AppCacheDispatcher(Get())); | 357 appcache_dispatcher_.reset(new AppCacheDispatcher(Get())); |
357 dom_storage_dispatcher_.reset(new DomStorageDispatcher()); | 358 dom_storage_dispatcher_.reset(new DomStorageDispatcher()); |
358 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher()); | 359 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher()); |
359 | 360 |
360 media_stream_center_ = NULL; | 361 media_stream_center_ = NULL; |
361 | 362 |
362 db_message_filter_ = new DBMessageFilter(); | 363 db_message_filter_ = new DBMessageFilter(); |
363 AddFilter(db_message_filter_.get()); | 364 AddFilter(db_message_filter_.get()); |
364 | 365 |
365 #if defined(ENABLE_WEBRTC) | 366 #if defined(ENABLE_WEBRTC) |
366 webrtc::SetupEventTracer(&GetCategoryEnabled, &AddTraceEvent); | 367 webrtc::SetupEventTracer(&GetCategoryGroupEnabled, &AddTraceEvent); |
367 | 368 |
368 peer_connection_tracker_.reset(new PeerConnectionTracker()); | 369 peer_connection_tracker_.reset(new PeerConnectionTracker()); |
369 AddObserver(peer_connection_tracker_.get()); | 370 AddObserver(peer_connection_tracker_.get()); |
370 | 371 |
371 p2p_socket_dispatcher_ = new P2PSocketDispatcher(GetIOMessageLoopProxy()); | 372 p2p_socket_dispatcher_ = new P2PSocketDispatcher(GetIOMessageLoopProxy()); |
372 AddFilter(p2p_socket_dispatcher_); | 373 AddFilter(p2p_socket_dispatcher_); |
373 #endif // defined(ENABLE_WEBRTC) | 374 #endif // defined(ENABLE_WEBRTC) |
374 vc_manager_ = new VideoCaptureImplManager(); | 375 vc_manager_ = new VideoCaptureImplManager(); |
375 AddFilter(vc_manager_->video_capture_message_filter()); | 376 AddFilter(vc_manager_->video_capture_message_filter()); |
376 | 377 |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 | 1288 |
1288 void RenderThreadImpl::SetFlingCurveParameters( | 1289 void RenderThreadImpl::SetFlingCurveParameters( |
1289 const std::vector<float>& new_touchpad, | 1290 const std::vector<float>& new_touchpad, |
1290 const std::vector<float>& new_touchscreen) { | 1291 const std::vector<float>& new_touchscreen) { |
1291 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1292 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
1292 new_touchscreen); | 1293 new_touchscreen); |
1293 | 1294 |
1294 } | 1295 } |
1295 | 1296 |
1296 } // namespace content | 1297 } // namespace content |
OLD | NEW |