| 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, NULL, | 224 num_args, arg_names, arg_types, arg_values, |
| 225 flags); | 225 NULL, flags); |
| 226 } | 226 } |
| 227 #endif | 227 #endif |
| 228 | 228 |
| 229 } // namespace | 229 } // namespace |
| 230 | 230 |
| 231 class RenderThreadImpl::GpuVDAContextLostCallback | 231 class RenderThreadImpl::GpuVDAContextLostCallback |
| 232 : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { | 232 : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { |
| 233 public: | 233 public: |
| 234 GpuVDAContextLostCallback() {} | 234 GpuVDAContextLostCallback() {} |
| 235 virtual ~GpuVDAContextLostCallback() {} | 235 virtual ~GpuVDAContextLostCallback() {} |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 appcache_dispatcher_.reset(new AppCacheDispatcher(Get())); | 357 appcache_dispatcher_.reset(new AppCacheDispatcher(Get())); |
| 358 dom_storage_dispatcher_.reset(new DomStorageDispatcher()); | 358 dom_storage_dispatcher_.reset(new DomStorageDispatcher()); |
| 359 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher()); | 359 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher()); |
| 360 | 360 |
| 361 media_stream_center_ = NULL; | 361 media_stream_center_ = NULL; |
| 362 | 362 |
| 363 db_message_filter_ = new DBMessageFilter(); | 363 db_message_filter_ = new DBMessageFilter(); |
| 364 AddFilter(db_message_filter_.get()); | 364 AddFilter(db_message_filter_.get()); |
| 365 | 365 |
| 366 #if defined(ENABLE_WEBRTC) | 366 #if defined(ENABLE_WEBRTC) |
| 367 webrtc::SetupEventTracer(&GetCategoryEnabled, &AddTraceEvent); | 367 webrtc::SetupEventTracer(&GetCategoryGroupEnabled, &AddTraceEvent); |
| 368 | 368 |
| 369 peer_connection_tracker_.reset(new PeerConnectionTracker()); | 369 peer_connection_tracker_.reset(new PeerConnectionTracker()); |
| 370 AddObserver(peer_connection_tracker_.get()); | 370 AddObserver(peer_connection_tracker_.get()); |
| 371 | 371 |
| 372 p2p_socket_dispatcher_ = new P2PSocketDispatcher(GetIOMessageLoopProxy()); | 372 p2p_socket_dispatcher_ = new P2PSocketDispatcher(GetIOMessageLoopProxy()); |
| 373 AddFilter(p2p_socket_dispatcher_); | 373 AddFilter(p2p_socket_dispatcher_); |
| 374 #endif // defined(ENABLE_WEBRTC) | 374 #endif // defined(ENABLE_WEBRTC) |
| 375 vc_manager_ = new VideoCaptureImplManager(); | 375 vc_manager_ = new VideoCaptureImplManager(); |
| 376 AddFilter(vc_manager_->video_capture_message_filter()); | 376 AddFilter(vc_manager_->video_capture_message_filter()); |
| 377 | 377 |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 | 1291 |
| 1292 void RenderThreadImpl::SetFlingCurveParameters( | 1292 void RenderThreadImpl::SetFlingCurveParameters( |
| 1293 const std::vector<float>& new_touchpad, | 1293 const std::vector<float>& new_touchpad, |
| 1294 const std::vector<float>& new_touchscreen) { | 1294 const std::vector<float>& new_touchscreen) { |
| 1295 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1295 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
| 1296 new_touchscreen); | 1296 new_touchscreen); |
| 1297 | 1297 |
| 1298 } | 1298 } |
| 1299 | 1299 |
| 1300 } // namespace content | 1300 } // namespace content |
| OLD | NEW |