Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(732)

Side by Side Diff: ppapi/thunk/ppb_trace_event_thunk.cc

Issue 11464005: Add trace event Pepper API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Feedback Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ppapi/c/dev/ppb_trace_event_dev.h"
6 #include "ppapi/shared_impl/ppb_trace_event_shared.h"
7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/ppb_instance_api.h"
9 #include "ppapi/thunk/thunk.h"
10
11 namespace ppapi {
12 namespace thunk {
13
14 namespace {
15
16 void* GetCategoryEnabled(const char* category_name) {
17 return ppapi::PPB_Trace_Event_Shared::GetCategoryEnabled(category_name);
18 }
19
20 int32_t AddTraceEvent(int8_t phase,
21 const void* category_enabled,
22 const char* name,
23 uint64_t id,
24 uint32_t num_args,
25 const char* arg_names[],
26 const uint8_t arg_types[],
27 const uint64_t arg_values[],
28 int32_t threshold_begin_id,
29 int64_t threshold,
30 uint8_t flags) {
31 return ppapi::PPB_Trace_Event_Shared::AddTraceEvent(phase,
32 category_enabled,
33 name,
34 id,
35 num_args,
36 arg_names,
37 arg_types,
38 arg_values,
39 threshold_begin_id,
40 threshold,
41 flags);
42 }
43
44 void SetThreadName(const char* thread_name) {
45 return ppapi::PPB_Trace_Event_Shared::SetThreadName(thread_name);
46 }
47
48 const PPB_Trace_Event_Dev g_ppb_trace_event_thunk = {
49 &GetCategoryEnabled,
50 &AddTraceEvent,
51 &SetThreadName,
52 };
53
54 } // namespace
55
56 const PPB_Trace_Event_Dev_0_1* GetPPB_Trace_Event_Dev_0_1_Thunk() {
57 return &g_ppb_trace_event_thunk;
58 }
59
60 } // namespace thunk
61 } // namespace ppapi
OLDNEW
« ppapi/shared_impl/ppb_trace_event_shared.cc ('K') | « ppapi/thunk/ppb_instance_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698