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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 const unsigned char* arg_types, | 634 const unsigned char* arg_types, |
635 const unsigned long long* arg_values, | 635 const unsigned long long* arg_values, |
636 unsigned char flags) { | 636 unsigned char flags) { |
637 base::TraceTicks timestamp_tt = | 637 base::TraceTicks timestamp_tt = |
638 base::TraceTicks() + base::TimeDelta::FromSecondsD(timestamp); | 638 base::TraceTicks() + base::TimeDelta::FromSecondsD(timestamp); |
639 base::trace_event::TraceEventHandle handle = | 639 base::trace_event::TraceEventHandle handle = |
640 TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP( | 640 TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP( |
641 phase, category_group_enabled, name, id, | 641 phase, category_group_enabled, name, id, |
642 base::PlatformThread::CurrentId(), | 642 base::PlatformThread::CurrentId(), |
643 timestamp_tt, | 643 timestamp_tt, |
644 num_args, arg_names, arg_types, arg_values, NULL, flags); | 644 num_args, arg_names, arg_types, arg_values, NULL, flags, 0); |
645 blink::Platform::TraceEventHandle result; | 645 blink::Platform::TraceEventHandle result; |
646 memcpy(&result, &handle, sizeof(result)); | 646 memcpy(&result, &handle, sizeof(result)); |
647 return result; | 647 return result; |
648 } | 648 } |
649 | 649 |
650 blink::Platform::TraceEventHandle BlinkPlatformImpl::addTraceEvent( | 650 blink::Platform::TraceEventHandle BlinkPlatformImpl::addTraceEvent( |
651 char phase, | 651 char phase, |
652 const unsigned char* category_group_enabled, | 652 const unsigned char* category_group_enabled, |
653 const char* name, | 653 const char* name, |
654 unsigned long long id, | 654 unsigned long long id, |
(...skipping 23 matching lines...) Expand all Loading... |
678 category_group_enabled, | 678 category_group_enabled, |
679 name, | 679 name, |
680 id, | 680 id, |
681 base::PlatformThread::CurrentId(), | 681 base::PlatformThread::CurrentId(), |
682 timestamp_tt, | 682 timestamp_tt, |
683 num_args, | 683 num_args, |
684 arg_names, | 684 arg_names, |
685 arg_types, | 685 arg_types, |
686 arg_values, | 686 arg_values, |
687 convertable_wrappers, | 687 convertable_wrappers, |
688 flags); | 688 flags, 0); |
689 blink::Platform::TraceEventHandle result; | 689 blink::Platform::TraceEventHandle result; |
690 memcpy(&result, &handle, sizeof(result)); | 690 memcpy(&result, &handle, sizeof(result)); |
691 return result; | 691 return result; |
692 } | 692 } |
693 | 693 |
694 void BlinkPlatformImpl::updateTraceEventDuration( | 694 void BlinkPlatformImpl::updateTraceEventDuration( |
695 const unsigned char* category_group_enabled, | 695 const unsigned char* category_group_enabled, |
696 const char* name, | 696 const char* name, |
697 TraceEventHandle handle) { | 697 TraceEventHandle handle) { |
698 base::trace_event::TraceEventHandle traceEventHandle; | 698 base::trace_event::TraceEventHandle traceEventHandle; |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1380 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
1381 static_cast<ui::DomCode>(dom_code))); | 1381 static_cast<ui::DomCode>(dom_code))); |
1382 } | 1382 } |
1383 | 1383 |
1384 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1384 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
1385 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1385 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
1386 code.utf8().data())); | 1386 code.utf8().data())); |
1387 } | 1387 } |
1388 | 1388 |
1389 } // namespace content | 1389 } // namespace content |
OLD | NEW |