Allow creating SharedMemory that can't be shared read-only.
[chromium-blink-merge.git] / ppapi / shared_impl / ppb_trace_event_impl.h
blobb7a5eb43f408bc5fa1e0222584add97647c8aaf8
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.
5 #ifndef PPAPI_SHARED_IMPL_PPB_TRACE_EVENT_IMPL_H_
6 #define PPAPI_SHARED_IMPL_PPB_TRACE_EVENT_IMPL_H_
8 #include "ppapi/c/dev/ppb_trace_event_dev.h"
9 #include "ppapi/c/pp_bool.h"
10 #include "ppapi/shared_impl/ppapi_shared_export.h"
12 namespace ppapi {
14 // Contains the implementation of the PPB_Trace_Event_Dev functions. Since these
15 // functions are to be run from whatever plugin process/thread in which they
16 // originated, the implementation lives in shared_impl.
18 class PPAPI_SHARED_EXPORT TraceEventImpl {
19 public:
20 static void* GetCategoryEnabled(const char* category_name);
21 static void AddTraceEvent(int8_t phase,
22 const void* category_enabled,
23 const char* name,
24 uint64_t id,
25 uint32_t num_args,
26 const char* arg_names[],
27 const uint8_t arg_types[],
28 const uint64_t arg_values[],
29 uint8_t flags);
30 static void AddTraceEventWithThreadIdAndTimestamp(
31 int8_t phase,
32 const void* category_enabled,
33 const char* name,
34 uint64_t id,
35 int32_t thread_id,
36 int64_t timestamp,
37 uint32_t num_args,
38 const char* arg_names[],
39 const uint8_t arg_types[],
40 const uint64_t arg_values[],
41 uint8_t flags);
42 static int64_t Now();
43 static void SetThreadName(const char* thread_name);
46 } // namespace ppapi
48 #endif // PPAPI_SHARED_IMPL_PPB_TRACE_EVENT_IMPL_H_