Home | History | Annotate | Download | only in private
      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 
      6 /* From private/ppb_uma_private.idl modified Tue Oct  2 13:17:06 2012. */
      7 
      8 #ifndef PPAPI_C_PRIVATE_PPB_UMA_PRIVATE_H_
      9 #define PPAPI_C_PRIVATE_PPB_UMA_PRIVATE_H_
     10 
     11 #include "ppapi/c/pp_bool.h"
     12 #include "ppapi/c/pp_macros.h"
     13 #include "ppapi/c/pp_stdint.h"
     14 #include "ppapi/c/pp_var.h"
     15 
     16 #define PPB_UMA_PRIVATE_INTERFACE_0_1 "PPB_UMA_Private;0.1"
     17 #define PPB_UMA_PRIVATE_INTERFACE PPB_UMA_PRIVATE_INTERFACE_0_1
     18 
     19 /**
     20  * @file
     21  * This file defines the <code>PPB_UMA_Private</code> interface.
     22  */
     23 
     24 
     25 /**
     26  * @addtogroup Interfaces
     27  * @{
     28  */
     29 /**
     30  * Contains functions for plugins to report UMA usage stats.
     31  */
     32 struct PPB_UMA_Private_0_1 {
     33   /**
     34    * HistogramCustomTimes is a pointer to a function which records a time
     35    * sample given in milliseconds in the histogram given by |name|, possibly
     36    * creating the histogram if it does not exist.
     37    */
     38   void (*HistogramCustomTimes)(struct PP_Var name,
     39                                int64_t sample,
     40                                int64_t min,
     41                                int64_t max,
     42                                uint32_t bucket_count);
     43   /**
     44    * HistogramCustomCounts is a pointer to a function which records a sample
     45    * in the histogram given by |name|, possibly creating the histogram if it
     46    * does not exist.
     47    */
     48   void (*HistogramCustomCounts)(struct PP_Var name,
     49                                 int32_t sample,
     50                                 int32_t min,
     51                                 int32_t max,
     52                                 uint32_t bucket_count);
     53   /**
     54    * HistogramEnumeration is a pointer to a function which records a sample
     55    * in the histogram given by |name|, possibly creating the histogram if it
     56    * does not exist.  The sample represents a value in an enumeration bounded
     57    * by |boundary_value|, that is, sample < boundary_value always.
     58    */
     59   void (*HistogramEnumeration)(struct PP_Var name,
     60                                int32_t sample,
     61                                int32_t boundary_value);
     62 };
     63 
     64 typedef struct PPB_UMA_Private_0_1 PPB_UMA_Private;
     65 /**
     66  * @}
     67  */
     68 
     69 #endif  /* PPAPI_C_PRIVATE_PPB_UMA_PRIVATE_H_ */
     70 
     71