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.
6 /* From private/ppb_uma_private.idl modified Fri Mar 14 16:59:33 2014. */
8 #ifndef PPAPI_C_PRIVATE_PPB_UMA_PRIVATE_H_
9 #define PPAPI_C_PRIVATE_PPB_UMA_PRIVATE_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_stdint.h"
16 #include "ppapi/c/pp_var.h"
18 #define PPB_UMA_PRIVATE_INTERFACE_0_3 "PPB_UMA_Private;0.3"
19 #define PPB_UMA_PRIVATE_INTERFACE PPB_UMA_PRIVATE_INTERFACE_0_3
23 * This file defines the <code>PPB_UMA_Private</code> interface.
28 * @addtogroup Interfaces
32 * Contains functions for plugins to report UMA usage stats.
34 struct PPB_UMA_Private_0_3
{
36 * HistogramCustomTimes is a pointer to a function which records a time
37 * sample given in milliseconds in the histogram given by |name|, possibly
38 * creating the histogram if it does not exist.
40 void (*HistogramCustomTimes
)(PP_Instance instance
,
45 uint32_t bucket_count
);
47 * HistogramCustomCounts is a pointer to a function which records a sample
48 * in the histogram given by |name|, possibly creating the histogram if it
51 void (*HistogramCustomCounts
)(PP_Instance instance
,
56 uint32_t bucket_count
);
58 * HistogramEnumeration is a pointer to a function which records a sample
59 * in the histogram given by |name|, possibly creating the histogram if it
60 * does not exist. The sample represents a value in an enumeration bounded
61 * by |boundary_value|, that is, sample < boundary_value always.
63 void (*HistogramEnumeration
)(PP_Instance instance
,
66 int32_t boundary_value
);
68 * IsCrashReportingEnabled returns PP_OK to the completion callback to
69 * indicate that the current user has opted-in to crash reporting, or
70 * PP_ERROR_* on failure or when a user has not opted-in. This can be used to
71 * gate other reporting processes such as analytics and crash reporting.
73 int32_t (*IsCrashReportingEnabled
)(PP_Instance instance
,
74 struct PP_CompletionCallback callback
);
77 typedef struct PPB_UMA_Private_0_3 PPB_UMA_Private
;
82 #endif /* PPAPI_C_PRIVATE_PPB_UMA_PRIVATE_H_ */