blob: 3215e64757721badccc24f3d279238023fc27d3c [file] [log] [blame]
[email protected]45649492014-01-24 20:49:341// 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.
4
5#ifndef PPAPI_PROXY_UMA_PRIVATE_RESOURCE_H_
6#define PPAPI_PROXY_UMA_PRIVATE_RESOURCE_H_
7
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"
12
13namespace ppapi {
14
15namespace proxy {
16
17class PPAPI_PROXY_EXPORT UMAPrivateResource
18 : public PluginResource,
19 public thunk::PPB_UMA_Singleton_API {
20 public:
21 UMAPrivateResource(Connection connection, PP_Instance instance);
nicke4784432015-04-23 14:01:4822 ~UMAPrivateResource() override;
[email protected]45649492014-01-24 20:49:3423
24 // Resource overrides.
nicke4784432015-04-23 14:01:4825 thunk::PPB_UMA_Singleton_API* AsPPB_UMA_Singleton_API() override;
[email protected]45649492014-01-24 20:49:3426
27 // PPB_UMA_Singleton_API implementation.
nicke4784432015-04-23 14:01:4828 void HistogramCustomTimes(PP_Instance instance,
29 struct PP_Var name,
30 int64_t sample,
31 int64_t min,
32 int64_t max,
33 uint32_t bucket_count) override;
[email protected]45649492014-01-24 20:49:3434
nicke4784432015-04-23 14:01:4835 void HistogramCustomCounts(PP_Instance instance,
36 struct PP_Var name,
37 int32_t sample,
38 int32_t min,
39 int32_t max,
40 uint32_t bucket_count) override;
[email protected]45649492014-01-24 20:49:3441
nicke4784432015-04-23 14:01:4842 void HistogramEnumeration(PP_Instance instance,
43 struct PP_Var name,
44 int32_t sample,
45 int32_t boundary_value) override;
[email protected]45649492014-01-24 20:49:3446
nicke4784432015-04-23 14:01:4847 int32_t IsCrashReportingEnabled(
[email protected]1ef13cf2014-03-21 22:44:0148 PP_Instance instance,
mostynb699af3c2014-10-06 18:03:3449 scoped_refptr<TrackedCallback> callback) override;
[email protected]1ef13cf2014-03-21 22:44:0150
[email protected]45649492014-01-24 20:49:3451 private:
[email protected]1ef13cf2014-03-21 22:44:0152 void OnPluginMsgIsCrashReportingEnabled(
53 const ResourceMessageReplyParams& params);
54 scoped_refptr<TrackedCallback> pending_callback_;
55
[email protected]45649492014-01-24 20:49:3456 DISALLOW_COPY_AND_ASSIGN(UMAPrivateResource);
57};
58
59} // namespace proxy
60} // namespace ppapi
61
62#endif // PPAPI_PROXY_UMA_PRIVATE_RESOURCE_H_