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
3 // found in the LICENSE file.
5 #ifndef PPAPI_PROXY_UMA_PRIVATE_RESOURCE_H_
6 #define PPAPI_PROXY_UMA_PRIVATE_RESOURCE_H_
8 #include "ppapi/proxy/connection.h"
9 #include "ppapi/proxy/plugin_resource.h"
10 #include "ppapi/proxy/ppapi_proxy_export.h"
11 #include "ppapi/thunk/ppb_uma_singleton_api.h"
17 class PPAPI_PROXY_EXPORT UMAPrivateResource
18 : public PluginResource
,
19 public thunk::PPB_UMA_Singleton_API
{
21 UMAPrivateResource(Connection connection
, PP_Instance instance
);
22 ~UMAPrivateResource() override
;
24 // Resource overrides.
25 thunk::PPB_UMA_Singleton_API
* AsPPB_UMA_Singleton_API() override
;
27 // PPB_UMA_Singleton_API implementation.
28 void HistogramCustomTimes(PP_Instance instance
,
33 uint32_t bucket_count
) override
;
35 void HistogramCustomCounts(PP_Instance instance
,
40 uint32_t bucket_count
) override
;
42 void HistogramEnumeration(PP_Instance instance
,
45 int32_t boundary_value
) override
;
47 int32_t IsCrashReportingEnabled(
49 scoped_refptr
<TrackedCallback
> callback
) override
;
52 void OnPluginMsgIsCrashReportingEnabled(
53 const ResourceMessageReplyParams
& params
);
54 scoped_refptr
<TrackedCallback
> pending_callback_
;
56 DISALLOW_COPY_AND_ASSIGN(UMAPrivateResource
);
62 #endif // PPAPI_PROXY_UMA_PRIVATE_RESOURCE_H_