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 "webkit/glue/webkitplatformsupport_impl.h" | 5 #include "webkit/glue/webkitplatformsupport_impl.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <malloc.h> | 8 #include <malloc.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
298 void WebKitPlatformSupportImpl::traceEventBegin(const char* name, void* id, | 298 void WebKitPlatformSupportImpl::traceEventBegin(const char* name, void* id, |
299 const char* extra) { | 299 const char* extra) { |
300 TRACE_EVENT_BEGIN_ETW(name, id, extra); | 300 TRACE_EVENT_BEGIN_ETW(name, id, extra); |
301 } | 301 } |
302 | 302 |
303 void WebKitPlatformSupportImpl::traceEventEnd(const char* name, void* id, | 303 void WebKitPlatformSupportImpl::traceEventEnd(const char* name, void* id, |
304 const char* extra) { | 304 const char* extra) { |
305 TRACE_EVENT_END_ETW(name, id, extra); | 305 TRACE_EVENT_END_ETW(name, id, extra); |
306 } | 306 } |
307 | 307 |
308 const unsigned char* WebKitPlatformSupportImpl::getCategoryEnabled( | |
309 const char* category_name) { | |
310 return TRACE_EVENT_API_GET_CATEGORY_ENABLED(category_name); | |
311 } | |
312 | |
313 int WebKitPlatformSupportImpl::addTraceEvent( | |
314 char phase, | |
315 const unsigned char* category_enabled, | |
316 const char* name, | |
317 unsigned long long id, | |
318 int num_args, | |
319 const char** arg_names, | |
320 const unsigned char* arg_types, | |
321 const unsigned long long* arg_values, | |
322 int threshold_begin_id, | |
323 long long threshold, | |
324 unsigned char flags) { | |
325 return TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_enabled, name, id, | |
326 num_args, arg_names, arg_types, | |
327 arg_values, threshold_begin_id, | |
328 threshold, flags); | |
329 } | |
330 | |
331 void WebKitPlatformSupportImpl::addCounterEvent( | |
332 const unsigned char* category_enabled, | |
333 const char* name, | |
334 unsigned long long id, | |
335 const char* arg1_name, int arg1_val, | |
336 const char* arg2_name, int arg2_val, | |
337 unsigned char flags) { | |
338 TRACE_EVENT_API_ADD_COUNTER_EVENT(category_enabled, name, id, arg1_name, | |
339 arg1_val, arg2_name, arg2_val, flags); | |
340 } | |
341 | |
342 unsigned long long WebKitPlatformSupportImpl::getInterProcessID(void* pointer) { | |
darin (slow to review)
2012/01/13 22:37:12
Is it necessary for the WebKit API to talk about "
nduca
2012/01/13 22:40:41
manglePointerForTracing?
jbates
2012/01/13 23:56:03
Done.
| |
343 return TRACE_EVENT_API_GET_ID_FROM_POINTER(pointer); | |
344 } | |
345 | |
308 namespace { | 346 namespace { |
309 | 347 |
310 WebData loadAudioSpatializationResource(WebKitPlatformSupportImpl* platform, | 348 WebData loadAudioSpatializationResource(WebKitPlatformSupportImpl* platform, |
311 const char* name) { | 349 const char* name) { |
312 #ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 | 350 #ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 |
313 const size_t kExpectedSpatializationNameLength = 31; | 351 const size_t kExpectedSpatializationNameLength = 31; |
314 if (strlen(name) != kExpectedSpatializationNameLength) { | 352 if (strlen(name) != kExpectedSpatializationNameLength) { |
315 return WebData(); | 353 return WebData(); |
316 } | 354 } |
317 | 355 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
693 worker_task_runner->OnWorkerRunLoopStarted(runLoop); | 731 worker_task_runner->OnWorkerRunLoopStarted(runLoop); |
694 } | 732 } |
695 | 733 |
696 void WebKitPlatformSupportImpl::didStopWorkerRunLoop( | 734 void WebKitPlatformSupportImpl::didStopWorkerRunLoop( |
697 const WebKit::WebWorkerRunLoop& runLoop) { | 735 const WebKit::WebWorkerRunLoop& runLoop) { |
698 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 736 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
699 worker_task_runner->OnWorkerRunLoopStopped(runLoop); | 737 worker_task_runner->OnWorkerRunLoopStopped(runLoop); |
700 } | 738 } |
701 | 739 |
702 } // namespace webkit_glue | 740 } // namespace webkit_glue |
OLD | NEW |