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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 base::Histogram::kUmaTargetedHistogramFlag); | 194 base::Histogram::kUmaTargetedHistogramFlag); |
195 return histogram; | 195 return histogram; |
196 } | 196 } |
197 | 197 |
198 void AddHistogramSample(void* hist, int sample) { | 198 void AddHistogramSample(void* hist, int sample) { |
199 base::Histogram* histogram = static_cast<base::Histogram*>(hist); | 199 base::Histogram* histogram = static_cast<base::Histogram*>(hist); |
200 histogram->Add(sample); | 200 histogram->Add(sample); |
201 } | 201 } |
202 | 202 |
203 #if defined(ENABLE_WEBRTC) | 203 #if defined(ENABLE_WEBRTC) |
204 const unsigned char* GetCategoryEnabled(const char* name) { | 204 const unsigned char* GetCategoryGroupEnabled(const char* category_group) { |
205 return TRACE_EVENT_API_GET_CATEGORY_ENABLED(name); | 205 return TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category_group); |
206 } | 206 } |
207 | 207 |
208 void AddTraceEvent(char phase, | 208 void AddTraceEvent(char phase, |
209 const unsigned char* category_enabled, | 209 const unsigned char* category_group_enabled, |
210 const char* name, | 210 const char* name, |
211 unsigned long long id, | 211 unsigned long long id, |
212 int num_args, | 212 int num_args, |
213 const char** arg_names, | 213 const char** arg_names, |
214 const unsigned char* arg_types, | 214 const unsigned char* arg_types, |
215 const unsigned long long* arg_values, | 215 const unsigned long long* arg_values, |
216 unsigned char flags) { | 216 unsigned char flags) { |
217 TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_enabled, name, id, num_args, | 217 TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_group_enabled, name, id, |
218 arg_names, arg_types, arg_values, flags); | 218 num_args, arg_names, arg_types, arg_values, |
| 219 flags); |
219 } | 220 } |
220 #endif | 221 #endif |
221 | 222 |
222 } // namespace | 223 } // namespace |
223 | 224 |
224 class RenderThreadImpl::GpuVDAContextLostCallback | 225 class RenderThreadImpl::GpuVDAContextLostCallback |
225 : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { | 226 : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { |
226 public: | 227 public: |
227 GpuVDAContextLostCallback() {} | 228 GpuVDAContextLostCallback() {} |
228 virtual ~GpuVDAContextLostCallback() {} | 229 virtual ~GpuVDAContextLostCallback() {} |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 appcache_dispatcher_.reset(new AppCacheDispatcher(Get())); | 327 appcache_dispatcher_.reset(new AppCacheDispatcher(Get())); |
327 dom_storage_dispatcher_.reset(new DomStorageDispatcher()); | 328 dom_storage_dispatcher_.reset(new DomStorageDispatcher()); |
328 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher()); | 329 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher()); |
329 | 330 |
330 media_stream_center_ = NULL; | 331 media_stream_center_ = NULL; |
331 | 332 |
332 db_message_filter_ = new DBMessageFilter(); | 333 db_message_filter_ = new DBMessageFilter(); |
333 AddFilter(db_message_filter_.get()); | 334 AddFilter(db_message_filter_.get()); |
334 | 335 |
335 #if defined(ENABLE_WEBRTC) | 336 #if defined(ENABLE_WEBRTC) |
336 webrtc::SetupEventTracer(&GetCategoryEnabled, &AddTraceEvent); | 337 webrtc::SetupEventTracer(&GetCategoryGroupEnabled, &AddTraceEvent); |
337 | 338 |
338 peer_connection_tracker_.reset(new PeerConnectionTracker()); | 339 peer_connection_tracker_.reset(new PeerConnectionTracker()); |
339 AddObserver(peer_connection_tracker_.get()); | 340 AddObserver(peer_connection_tracker_.get()); |
340 | 341 |
341 p2p_socket_dispatcher_ = new P2PSocketDispatcher(GetIOMessageLoopProxy()); | 342 p2p_socket_dispatcher_ = new P2PSocketDispatcher(GetIOMessageLoopProxy()); |
342 AddFilter(p2p_socket_dispatcher_); | 343 AddFilter(p2p_socket_dispatcher_); |
343 #endif // defined(ENABLE_WEBRTC) | 344 #endif // defined(ENABLE_WEBRTC) |
344 vc_manager_ = new VideoCaptureImplManager(); | 345 vc_manager_ = new VideoCaptureImplManager(); |
345 AddFilter(vc_manager_->video_capture_message_filter()); | 346 AddFilter(vc_manager_->video_capture_message_filter()); |
346 | 347 |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1198 | 1199 |
1199 void RenderThreadImpl::SetFlingCurveParameters( | 1200 void RenderThreadImpl::SetFlingCurveParameters( |
1200 const std::vector<float>& new_touchpad, | 1201 const std::vector<float>& new_touchpad, |
1201 const std::vector<float>& new_touchscreen) { | 1202 const std::vector<float>& new_touchscreen) { |
1202 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1203 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
1203 new_touchscreen); | 1204 new_touchscreen); |
1204 | 1205 |
1205 } | 1206 } |
1206 | 1207 |
1207 } // namespace content | 1208 } // namespace content |
OLD | NEW |