OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/child/blink_platform_impl.h" | 5 #include "content/child/blink_platform_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 case 1: | 594 case 1: |
595 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(1)); | 595 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(1)); |
596 case 2: | 596 case 2: |
597 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(2)); | 597 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(2)); |
598 default: | 598 default: |
599 NOTREACHED() << "Unknown thread bucket type."; | 599 NOTREACHED() << "Unknown thread bucket type."; |
600 } | 600 } |
601 return NULL; | 601 return NULL; |
602 } | 602 } |
603 | 603 |
604 COMPILE_ASSERT( | 604 static_assert( |
605 sizeof(blink::Platform::TraceEventHandle) == | 605 sizeof(blink::Platform::TraceEventHandle) == |
606 sizeof(base::debug::TraceEventHandle), | 606 sizeof(base::debug::TraceEventHandle), |
607 TraceEventHandle_types_must_be_same_size); | 607 "TraceEventHandle types must be same size"); |
608 | 608 |
609 blink::Platform::TraceEventHandle BlinkPlatformImpl::addTraceEvent( | 609 blink::Platform::TraceEventHandle BlinkPlatformImpl::addTraceEvent( |
610 char phase, | 610 char phase, |
611 const unsigned char* category_group_enabled, | 611 const unsigned char* category_group_enabled, |
612 const char* name, | 612 const char* name, |
613 unsigned long long id, | 613 unsigned long long id, |
614 int num_args, | 614 int num_args, |
615 const char** arg_names, | 615 const char** arg_names, |
616 const unsigned char* arg_types, | 616 const unsigned char* arg_types, |
617 const unsigned long long* arg_values, | 617 const unsigned long long* arg_values, |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 } | 1247 } |
1248 | 1248 |
1249 // static | 1249 // static |
1250 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 1250 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
1251 WebThreadImplForMessageLoop* impl = | 1251 WebThreadImplForMessageLoop* impl = |
1252 static_cast<WebThreadImplForMessageLoop*>(thread); | 1252 static_cast<WebThreadImplForMessageLoop*>(thread); |
1253 delete impl; | 1253 delete impl; |
1254 } | 1254 } |
1255 | 1255 |
1256 } // namespace content | 1256 } // namespace content |
OLD | NEW |