| 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/child/webkitplatformsupport_impl.h" | 5 #include "webkit/child/webkitplatformsupport_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 const unsigned long long* arg_values, | 483 const unsigned long long* arg_values, |
| 484 unsigned char flags) { | 484 unsigned char flags) { |
| 485 base::debug::TraceEventHandle handle = TRACE_EVENT_API_ADD_TRACE_EVENT( | 485 base::debug::TraceEventHandle handle = TRACE_EVENT_API_ADD_TRACE_EVENT( |
| 486 phase, category_group_enabled, name, id, | 486 phase, category_group_enabled, name, id, |
| 487 num_args, arg_names, arg_types, arg_values, NULL, flags); | 487 num_args, arg_names, arg_types, arg_values, NULL, flags); |
| 488 blink::Platform::TraceEventHandle result; | 488 blink::Platform::TraceEventHandle result; |
| 489 memcpy(&result, &handle, sizeof(result)); | 489 memcpy(&result, &handle, sizeof(result)); |
| 490 return result; | 490 return result; |
| 491 } | 491 } |
| 492 | 492 |
| 493 // TODO(wangxianzhu): Remove this. | |
| 494 void WebKitPlatformSupportImpl::updateTraceEventDuration( | |
| 495 TraceEventHandle handle) { | |
| 496 updateTraceEventDuration(NULL, NULL, handle); | |
| 497 } | |
| 498 | |
| 499 void WebKitPlatformSupportImpl::updateTraceEventDuration( | 493 void WebKitPlatformSupportImpl::updateTraceEventDuration( |
| 500 const unsigned char* category_group_enabled, | 494 const unsigned char* category_group_enabled, |
| 501 const char* name, | 495 const char* name, |
| 502 TraceEventHandle handle) { | 496 TraceEventHandle handle) { |
| 503 base::debug::TraceEventHandle traceEventHandle; | 497 base::debug::TraceEventHandle traceEventHandle; |
| 504 memcpy(&traceEventHandle, &handle, sizeof(handle)); | 498 memcpy(&traceEventHandle, &handle, sizeof(handle)); |
| 505 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( | 499 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( |
| 506 category_group_enabled, name, traceEventHandle); | 500 category_group_enabled, name, traceEventHandle); |
| 507 } | 501 } |
| 508 | 502 |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 if (--shared_timer_suspended_ == 0 && | 935 if (--shared_timer_suspended_ == 0 && |
| 942 (!shared_timer_.IsRunning() || | 936 (!shared_timer_.IsRunning() || |
| 943 shared_timer_fire_time_was_set_while_suspended_)) { | 937 shared_timer_fire_time_was_set_while_suspended_)) { |
| 944 shared_timer_fire_time_was_set_while_suspended_ = false; | 938 shared_timer_fire_time_was_set_while_suspended_ = false; |
| 945 setSharedTimerFireInterval( | 939 setSharedTimerFireInterval( |
| 946 shared_timer_fire_time_ - monotonicallyIncreasingTime()); | 940 shared_timer_fire_time_ - monotonicallyIncreasingTime()); |
| 947 } | 941 } |
| 948 } | 942 } |
| 949 | 943 |
| 950 } // namespace webkit_glue | 944 } // namespace webkit_glue |
| OLD | NEW |