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