Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/nsIPerformanceStats.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /src/mozilla-central/toolkit/components/perfmonitoring/nsIPerformanceStats.idl
3
 */
4
5
#ifndef __gen_nsIPerformanceStats_h__
6
#define __gen_nsIPerformanceStats_h__
7
8
9
#ifndef __gen_nsISupports_h__
10
#include "nsISupports.h"
11
#endif
12
13
#ifndef __gen_nsIArray_h__
14
#include "nsIArray.h"
15
#endif
16
17
#ifndef __gen_nsIDOMWindow_h__
18
#include "nsIDOMWindow.h"
19
#endif
20
21
#include "js/Value.h"
22
23
#include "js/GCAnnotations.h"
24
25
/* For IDL files that don't want to include root IDL files. */
26
#ifndef NS_NO_VTABLE
27
#define NS_NO_VTABLE
28
#endif
29
30
/* starting interface:    nsIPerformanceGroupDetails */
31
#define NS_IPERFORMANCEGROUPDETAILS_IID_STR "994c56be-939a-4f20-8364-124f6422d86a"
32
33
#define NS_IPERFORMANCEGROUPDETAILS_IID \
34
  {0x994c56be, 0x939a, 0x4f20, \
35
    { 0x83, 0x64, 0x12, 0x4f, 0x64, 0x22, 0xd8, 0x6a }}
36
37
class NS_NO_VTABLE nsIPerformanceGroupDetails : public nsISupports {
38
 public:
39
40
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPERFORMANCEGROUPDETAILS_IID)
41
42
  /* readonly attribute AString groupId; */
43
  NS_IMETHOD GetGroupId(nsAString& aGroupId) = 0;
44
45
  /* readonly attribute AString name; */
46
  NS_IMETHOD GetName(nsAString& aName) = 0;
47
48
  /* readonly attribute uint64_t windowId; */
49
  NS_IMETHOD GetWindowId(uint64_t *aWindowId) = 0;
50
51
  /* readonly attribute bool isSystem; */
52
  NS_IMETHOD GetIsSystem(bool *aIsSystem) = 0;
53
54
  /* readonly attribute unsigned long long processId; */
55
  NS_IMETHOD GetProcessId(uint64_t *aProcessId) = 0;
56
57
  /* readonly attribute bool isContentProcess; */
58
  NS_IMETHOD GetIsContentProcess(bool *aIsContentProcess) = 0;
59
60
};
61
62
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPerformanceGroupDetails, NS_IPERFORMANCEGROUPDETAILS_IID)
63
64
/* Use this macro when declaring classes that implement this interface. */
65
#define NS_DECL_NSIPERFORMANCEGROUPDETAILS \
66
  NS_IMETHOD GetGroupId(nsAString& aGroupId) override; \
67
  NS_IMETHOD GetName(nsAString& aName) override; \
68
  NS_IMETHOD GetWindowId(uint64_t *aWindowId) override; \
69
  NS_IMETHOD GetIsSystem(bool *aIsSystem) override; \
70
  NS_IMETHOD GetProcessId(uint64_t *aProcessId) override; \
71
  NS_IMETHOD GetIsContentProcess(bool *aIsContentProcess) override; 
72
73
/* Use this macro when declaring the members of this interface when the
74
   class doesn't implement the interface. This is useful for forwarding. */
75
#define NS_DECL_NON_VIRTUAL_NSIPERFORMANCEGROUPDETAILS \
76
  nsresult GetGroupId(nsAString& aGroupId); \
77
  nsresult GetName(nsAString& aName); \
78
  nsresult GetWindowId(uint64_t *aWindowId); \
79
  nsresult GetIsSystem(bool *aIsSystem); \
80
  nsresult GetProcessId(uint64_t *aProcessId); \
81
  nsresult GetIsContentProcess(bool *aIsContentProcess); 
82
83
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
84
#define NS_FORWARD_NSIPERFORMANCEGROUPDETAILS(_to) \
85
0
  NS_IMETHOD GetGroupId(nsAString& aGroupId) override { return _to GetGroupId(aGroupId); } \
86
0
  NS_IMETHOD GetName(nsAString& aName) override { return _to GetName(aName); } \
87
0
  NS_IMETHOD GetWindowId(uint64_t *aWindowId) override { return _to GetWindowId(aWindowId); } \
88
0
  NS_IMETHOD GetIsSystem(bool *aIsSystem) override { return _to GetIsSystem(aIsSystem); } \
89
0
  NS_IMETHOD GetProcessId(uint64_t *aProcessId) override { return _to GetProcessId(aProcessId); } \
90
0
  NS_IMETHOD GetIsContentProcess(bool *aIsContentProcess) override { return _to GetIsContentProcess(aIsContentProcess); } 
91
92
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
93
#define NS_FORWARD_SAFE_NSIPERFORMANCEGROUPDETAILS(_to) \
94
  NS_IMETHOD GetGroupId(nsAString& aGroupId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGroupId(aGroupId); } \
95
  NS_IMETHOD GetName(nsAString& aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
96
  NS_IMETHOD GetWindowId(uint64_t *aWindowId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowId(aWindowId); } \
97
  NS_IMETHOD GetIsSystem(bool *aIsSystem) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsSystem(aIsSystem); } \
98
  NS_IMETHOD GetProcessId(uint64_t *aProcessId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProcessId(aProcessId); } \
99
  NS_IMETHOD GetIsContentProcess(bool *aIsContentProcess) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsContentProcess(aIsContentProcess); } 
100
101
102
/* starting interface:    nsIPerformanceStats */
103
#define NS_IPERFORMANCESTATS_IID_STR "8a635d4b-aa56-466b-9a7d-9f91ca9405ef"
104
105
#define NS_IPERFORMANCESTATS_IID \
106
  {0x8a635d4b, 0xaa56, 0x466b, \
107
    { 0x9a, 0x7d, 0x9f, 0x91, 0xca, 0x94, 0x05, 0xef }}
108
109
class NS_NO_VTABLE nsIPerformanceStats : public nsIPerformanceGroupDetails {
110
 public:
111
112
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPERFORMANCESTATS_IID)
113
114
  /* readonly attribute unsigned long long totalUserTime; */
115
  NS_IMETHOD GetTotalUserTime(uint64_t *aTotalUserTime) = 0;
116
117
  /* readonly attribute unsigned long long totalSystemTime; */
118
  NS_IMETHOD GetTotalSystemTime(uint64_t *aTotalSystemTime) = 0;
119
120
  /* readonly attribute unsigned long long totalCPOWTime; */
121
  NS_IMETHOD GetTotalCPOWTime(uint64_t *aTotalCPOWTime) = 0;
122
123
  /* readonly attribute unsigned long long ticks; */
124
  NS_IMETHOD GetTicks(uint64_t *aTicks) = 0;
125
126
  /* void getDurations ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out unsigned long long aNumberOfOccurrences); */
127
  NS_IMETHOD GetDurations(uint32_t *aCount, uint64_t **aNumberOfOccurrences) = 0;
128
129
};
130
131
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPerformanceStats, NS_IPERFORMANCESTATS_IID)
132
133
/* Use this macro when declaring classes that implement this interface. */
134
#define NS_DECL_NSIPERFORMANCESTATS \
135
  NS_IMETHOD GetTotalUserTime(uint64_t *aTotalUserTime) override; \
136
  NS_IMETHOD GetTotalSystemTime(uint64_t *aTotalSystemTime) override; \
137
  NS_IMETHOD GetTotalCPOWTime(uint64_t *aTotalCPOWTime) override; \
138
  NS_IMETHOD GetTicks(uint64_t *aTicks) override; \
139
  NS_IMETHOD GetDurations(uint32_t *aCount, uint64_t **aNumberOfOccurrences) override; 
140
141
/* Use this macro when declaring the members of this interface when the
142
   class doesn't implement the interface. This is useful for forwarding. */
143
#define NS_DECL_NON_VIRTUAL_NSIPERFORMANCESTATS \
144
  nsresult GetTotalUserTime(uint64_t *aTotalUserTime); \
145
  nsresult GetTotalSystemTime(uint64_t *aTotalSystemTime); \
146
  nsresult GetTotalCPOWTime(uint64_t *aTotalCPOWTime); \
147
  nsresult GetTicks(uint64_t *aTicks); \
148
  nsresult GetDurations(uint32_t *aCount, uint64_t **aNumberOfOccurrences); 
149
150
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
151
#define NS_FORWARD_NSIPERFORMANCESTATS(_to) \
152
  NS_IMETHOD GetTotalUserTime(uint64_t *aTotalUserTime) override { return _to GetTotalUserTime(aTotalUserTime); } \
153
  NS_IMETHOD GetTotalSystemTime(uint64_t *aTotalSystemTime) override { return _to GetTotalSystemTime(aTotalSystemTime); } \
154
  NS_IMETHOD GetTotalCPOWTime(uint64_t *aTotalCPOWTime) override { return _to GetTotalCPOWTime(aTotalCPOWTime); } \
155
  NS_IMETHOD GetTicks(uint64_t *aTicks) override { return _to GetTicks(aTicks); } \
156
  NS_IMETHOD GetDurations(uint32_t *aCount, uint64_t **aNumberOfOccurrences) override { return _to GetDurations(aCount, aNumberOfOccurrences); } 
157
158
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
159
#define NS_FORWARD_SAFE_NSIPERFORMANCESTATS(_to) \
160
  NS_IMETHOD GetTotalUserTime(uint64_t *aTotalUserTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTotalUserTime(aTotalUserTime); } \
161
  NS_IMETHOD GetTotalSystemTime(uint64_t *aTotalSystemTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTotalSystemTime(aTotalSystemTime); } \
162
  NS_IMETHOD GetTotalCPOWTime(uint64_t *aTotalCPOWTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTotalCPOWTime(aTotalCPOWTime); } \
163
  NS_IMETHOD GetTicks(uint64_t *aTicks) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTicks(aTicks); } \
164
  NS_IMETHOD GetDurations(uint32_t *aCount, uint64_t **aNumberOfOccurrences) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDurations(aCount, aNumberOfOccurrences); } 
165
166
167
/* starting interface:    nsIPerformanceSnapshot */
168
#define NS_IPERFORMANCESNAPSHOT_IID_STR "13cc235b-739e-4690-b0e3-d89cbe036a93"
169
170
#define NS_IPERFORMANCESNAPSHOT_IID \
171
  {0x13cc235b, 0x739e, 0x4690, \
172
    { 0xb0, 0xe3, 0xd8, 0x9c, 0xbe, 0x03, 0x6a, 0x93 }}
173
174
class NS_NO_VTABLE nsIPerformanceSnapshot : public nsISupports {
175
 public:
176
177
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPERFORMANCESNAPSHOT_IID)
178
179
  /* nsIArray getComponentsData (); */
180
  NS_IMETHOD GetComponentsData(nsIArray **_retval) = 0;
181
182
  /* nsIPerformanceStats getProcessData (); */
183
  NS_IMETHOD GetProcessData(nsIPerformanceStats **_retval) = 0;
184
185
};
186
187
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPerformanceSnapshot, NS_IPERFORMANCESNAPSHOT_IID)
188
189
/* Use this macro when declaring classes that implement this interface. */
190
#define NS_DECL_NSIPERFORMANCESNAPSHOT \
191
  NS_IMETHOD GetComponentsData(nsIArray **_retval) override; \
192
  NS_IMETHOD GetProcessData(nsIPerformanceStats **_retval) override; 
193
194
/* Use this macro when declaring the members of this interface when the
195
   class doesn't implement the interface. This is useful for forwarding. */
196
#define NS_DECL_NON_VIRTUAL_NSIPERFORMANCESNAPSHOT \
197
  nsresult GetComponentsData(nsIArray **_retval); \
198
  nsresult GetProcessData(nsIPerformanceStats **_retval); 
199
200
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
201
#define NS_FORWARD_NSIPERFORMANCESNAPSHOT(_to) \
202
  NS_IMETHOD GetComponentsData(nsIArray **_retval) override { return _to GetComponentsData(_retval); } \
203
  NS_IMETHOD GetProcessData(nsIPerformanceStats **_retval) override { return _to GetProcessData(_retval); } 
204
205
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
206
#define NS_FORWARD_SAFE_NSIPERFORMANCESNAPSHOT(_to) \
207
  NS_IMETHOD GetComponentsData(nsIArray **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetComponentsData(_retval); } \
208
  NS_IMETHOD GetProcessData(nsIPerformanceStats **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProcessData(_retval); } 
209
210
211
/* starting interface:    nsIPerformanceAlert */
212
#define NS_IPERFORMANCEALERT_IID_STR "a85706ab-d703-4687-8865-78cd771eab93"
213
214
#define NS_IPERFORMANCEALERT_IID \
215
  {0xa85706ab, 0xd703, 0x4687, \
216
    { 0x88, 0x65, 0x78, 0xcd, 0x77, 0x1e, 0xab, 0x93 }}
217
218
class NS_NO_VTABLE nsIPerformanceAlert : public nsISupports {
219
 public:
220
221
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPERFORMANCEALERT_IID)
222
223
  enum {
224
    REASON_SLOWDOWN = 1U,
225
    REASON_JANK_IN_ANIMATION = 2U,
226
    REASON_JANK_IN_INPUT = 4U
227
  };
228
229
  /* readonly attribute unsigned long reason; */
230
  NS_IMETHOD GetReason(uint32_t *aReason) = 0;
231
232
  /* readonly attribute unsigned long long highestJank; */
233
  NS_IMETHOD GetHighestJank(uint64_t *aHighestJank) = 0;
234
235
  /* readonly attribute unsigned long long highestCPOW; */
236
  NS_IMETHOD GetHighestCPOW(uint64_t *aHighestCPOW) = 0;
237
238
};
239
240
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPerformanceAlert, NS_IPERFORMANCEALERT_IID)
241
242
/* Use this macro when declaring classes that implement this interface. */
243
#define NS_DECL_NSIPERFORMANCEALERT \
244
  NS_IMETHOD GetReason(uint32_t *aReason) override; \
245
  NS_IMETHOD GetHighestJank(uint64_t *aHighestJank) override; \
246
  NS_IMETHOD GetHighestCPOW(uint64_t *aHighestCPOW) override; 
247
248
/* Use this macro when declaring the members of this interface when the
249
   class doesn't implement the interface. This is useful for forwarding. */
250
#define NS_DECL_NON_VIRTUAL_NSIPERFORMANCEALERT \
251
  nsresult GetReason(uint32_t *aReason); \
252
  nsresult GetHighestJank(uint64_t *aHighestJank); \
253
  nsresult GetHighestCPOW(uint64_t *aHighestCPOW); 
254
255
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
256
#define NS_FORWARD_NSIPERFORMANCEALERT(_to) \
257
  NS_IMETHOD GetReason(uint32_t *aReason) override { return _to GetReason(aReason); } \
258
  NS_IMETHOD GetHighestJank(uint64_t *aHighestJank) override { return _to GetHighestJank(aHighestJank); } \
259
  NS_IMETHOD GetHighestCPOW(uint64_t *aHighestCPOW) override { return _to GetHighestCPOW(aHighestCPOW); } 
260
261
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
262
#define NS_FORWARD_SAFE_NSIPERFORMANCEALERT(_to) \
263
  NS_IMETHOD GetReason(uint32_t *aReason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReason(aReason); } \
264
  NS_IMETHOD GetHighestJank(uint64_t *aHighestJank) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHighestJank(aHighestJank); } \
265
  NS_IMETHOD GetHighestCPOW(uint64_t *aHighestCPOW) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHighestCPOW(aHighestCPOW); } 
266
267
268
/* starting interface:    nsIPerformanceObserver */
269
#define NS_IPERFORMANCEOBSERVER_IID_STR "b746a929-3fec-420b-8ed8-c35d71995e05"
270
271
#define NS_IPERFORMANCEOBSERVER_IID \
272
  {0xb746a929, 0x3fec, 0x420b, \
273
    { 0x8e, 0xd8, 0xc3, 0x5d, 0x71, 0x99, 0x5e, 0x05 }}
274
275
class NS_NO_VTABLE nsIPerformanceObserver : public nsISupports {
276
 public:
277
278
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPERFORMANCEOBSERVER_IID)
279
280
  /* void observe (in nsIPerformanceGroupDetails target, in nsIPerformanceAlert alert); */
281
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Observe(nsIPerformanceGroupDetails *target, nsIPerformanceAlert *alert) = 0;
282
283
};
284
285
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPerformanceObserver, NS_IPERFORMANCEOBSERVER_IID)
286
287
/* Use this macro when declaring classes that implement this interface. */
288
#define NS_DECL_NSIPERFORMANCEOBSERVER \
289
  NS_IMETHOD Observe(nsIPerformanceGroupDetails *target, nsIPerformanceAlert *alert) override; 
290
291
/* Use this macro when declaring the members of this interface when the
292
   class doesn't implement the interface. This is useful for forwarding. */
293
#define NS_DECL_NON_VIRTUAL_NSIPERFORMANCEOBSERVER \
294
  nsresult Observe(nsIPerformanceGroupDetails *target, nsIPerformanceAlert *alert); 
295
296
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
297
#define NS_FORWARD_NSIPERFORMANCEOBSERVER(_to) \
298
  NS_IMETHOD Observe(nsIPerformanceGroupDetails *target, nsIPerformanceAlert *alert) override { return _to Observe(target, alert); } 
299
300
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
301
#define NS_FORWARD_SAFE_NSIPERFORMANCEOBSERVER(_to) \
302
  NS_IMETHOD Observe(nsIPerformanceGroupDetails *target, nsIPerformanceAlert *alert) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Observe(target, alert); } 
303
304
305
/* starting interface:    nsIPerformanceObservable */
306
#define NS_IPERFORMANCEOBSERVABLE_IID_STR "b85720d0-e328-4342-9e46-8ca1acf8c70e"
307
308
#define NS_IPERFORMANCEOBSERVABLE_IID \
309
  {0xb85720d0, 0xe328, 0x4342, \
310
    { 0x9e, 0x46, 0x8c, 0xa1, 0xac, 0xf8, 0xc7, 0x0e }}
311
312
class NS_NO_VTABLE nsIPerformanceObservable : public nsISupports {
313
 public:
314
315
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPERFORMANCEOBSERVABLE_IID)
316
317
  /* readonly attribute nsIPerformanceGroupDetails target; */
318
  NS_IMETHOD GetTarget(nsIPerformanceGroupDetails **aTarget) = 0;
319
320
  /* void addJankObserver (in nsIPerformanceObserver observer); */
321
  NS_IMETHOD AddJankObserver(nsIPerformanceObserver *observer) = 0;
322
323
  /* void removeJankObserver (in nsIPerformanceObserver observer); */
324
  NS_IMETHOD RemoveJankObserver(nsIPerformanceObserver *observer) = 0;
325
326
};
327
328
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPerformanceObservable, NS_IPERFORMANCEOBSERVABLE_IID)
329
330
/* Use this macro when declaring classes that implement this interface. */
331
#define NS_DECL_NSIPERFORMANCEOBSERVABLE \
332
  NS_IMETHOD GetTarget(nsIPerformanceGroupDetails **aTarget) override; \
333
  NS_IMETHOD AddJankObserver(nsIPerformanceObserver *observer) override; \
334
  NS_IMETHOD RemoveJankObserver(nsIPerformanceObserver *observer) override; 
335
336
/* Use this macro when declaring the members of this interface when the
337
   class doesn't implement the interface. This is useful for forwarding. */
338
#define NS_DECL_NON_VIRTUAL_NSIPERFORMANCEOBSERVABLE \
339
  nsresult GetTarget(nsIPerformanceGroupDetails **aTarget); \
340
  nsresult AddJankObserver(nsIPerformanceObserver *observer); \
341
  nsresult RemoveJankObserver(nsIPerformanceObserver *observer); 
342
343
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
344
#define NS_FORWARD_NSIPERFORMANCEOBSERVABLE(_to) \
345
  NS_IMETHOD GetTarget(nsIPerformanceGroupDetails **aTarget) override { return _to GetTarget(aTarget); } \
346
  NS_IMETHOD AddJankObserver(nsIPerformanceObserver *observer) override { return _to AddJankObserver(observer); } \
347
  NS_IMETHOD RemoveJankObserver(nsIPerformanceObserver *observer) override { return _to RemoveJankObserver(observer); } 
348
349
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
350
#define NS_FORWARD_SAFE_NSIPERFORMANCEOBSERVABLE(_to) \
351
  NS_IMETHOD GetTarget(nsIPerformanceGroupDetails **aTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \
352
  NS_IMETHOD AddJankObserver(nsIPerformanceObserver *observer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddJankObserver(observer); } \
353
  NS_IMETHOD RemoveJankObserver(nsIPerformanceObserver *observer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveJankObserver(observer); } 
354
355
356
/* starting interface:    nsIPerformanceStatsService */
357
#define NS_IPERFORMANCESTATSSERVICE_IID_STR "505bc42e-be38-4a53-baba-92cb33690cde"
358
359
#define NS_IPERFORMANCESTATSSERVICE_IID \
360
  {0x505bc42e, 0xbe38, 0x4a53, \
361
    { 0xba, 0xba, 0x92, 0xcb, 0x33, 0x69, 0x0c, 0xde }}
362
363
class NS_NO_VTABLE nsIPerformanceStatsService : public nsISupports {
364
 public:
365
366
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPERFORMANCESTATSSERVICE_IID)
367
368
  /* [implicit_jscontext] attribute bool isMonitoringCPOW; */
369
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIsMonitoringCPOW(JSContext* cx, bool *aIsMonitoringCPOW) = 0;
370
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetIsMonitoringCPOW(JSContext* cx, bool aIsMonitoringCPOW) = 0;
371
372
  /* [implicit_jscontext] attribute bool isMonitoringJank; */
373
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIsMonitoringJank(JSContext* cx, bool *aIsMonitoringJank) = 0;
374
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetIsMonitoringJank(JSContext* cx, bool aIsMonitoringJank) = 0;
375
376
  /* [implicit_jscontext] attribute bool isMonitoringPerCompartment; */
377
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIsMonitoringPerCompartment(JSContext* cx, bool *aIsMonitoringPerCompartment) = 0;
378
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetIsMonitoringPerCompartment(JSContext* cx, bool aIsMonitoringPerCompartment) = 0;
379
380
  /* [implicit_jscontext] nsIPerformanceSnapshot getSnapshot (); */
381
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetSnapshot(JSContext* cx, nsIPerformanceSnapshot **_retval) = 0;
382
383
  /* attribute unsigned long long jankAlertThreshold; */
384
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetJankAlertThreshold(uint64_t *aJankAlertThreshold) = 0;
385
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetJankAlertThreshold(uint64_t aJankAlertThreshold) = 0;
386
387
  /* attribute short animationJankLevelThreshold; */
388
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAnimationJankLevelThreshold(int16_t *aAnimationJankLevelThreshold) = 0;
389
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetAnimationJankLevelThreshold(int16_t aAnimationJankLevelThreshold) = 0;
390
391
  /* attribute unsigned long long userInputDelayThreshold; */
392
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUserInputDelayThreshold(uint64_t *aUserInputDelayThreshold) = 0;
393
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetUserInputDelayThreshold(uint64_t aUserInputDelayThreshold) = 0;
394
395
  /* attribute unsigned long jankAlertBufferingDelay; */
396
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetJankAlertBufferingDelay(uint32_t *aJankAlertBufferingDelay) = 0;
397
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetJankAlertBufferingDelay(uint32_t aJankAlertBufferingDelay) = 0;
398
399
  /* nsIPerformanceObservable getObservableWindow (in unsigned long long windowId); */
400
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetObservableWindow(uint64_t windowId, nsIPerformanceObservable **_retval) = 0;
401
402
};
403
404
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPerformanceStatsService, NS_IPERFORMANCESTATSSERVICE_IID)
405
406
/* Use this macro when declaring classes that implement this interface. */
407
#define NS_DECL_NSIPERFORMANCESTATSSERVICE \
408
  NS_IMETHOD GetIsMonitoringCPOW(JSContext* cx, bool *aIsMonitoringCPOW) override; \
409
  NS_IMETHOD SetIsMonitoringCPOW(JSContext* cx, bool aIsMonitoringCPOW) override; \
410
  NS_IMETHOD GetIsMonitoringJank(JSContext* cx, bool *aIsMonitoringJank) override; \
411
  NS_IMETHOD SetIsMonitoringJank(JSContext* cx, bool aIsMonitoringJank) override; \
412
  NS_IMETHOD GetIsMonitoringPerCompartment(JSContext* cx, bool *aIsMonitoringPerCompartment) override; \
413
  NS_IMETHOD SetIsMonitoringPerCompartment(JSContext* cx, bool aIsMonitoringPerCompartment) override; \
414
  NS_IMETHOD GetSnapshot(JSContext* cx, nsIPerformanceSnapshot **_retval) override; \
415
  NS_IMETHOD GetJankAlertThreshold(uint64_t *aJankAlertThreshold) override; \
416
  NS_IMETHOD SetJankAlertThreshold(uint64_t aJankAlertThreshold) override; \
417
  NS_IMETHOD GetAnimationJankLevelThreshold(int16_t *aAnimationJankLevelThreshold) override; \
418
  NS_IMETHOD SetAnimationJankLevelThreshold(int16_t aAnimationJankLevelThreshold) override; \
419
  NS_IMETHOD GetUserInputDelayThreshold(uint64_t *aUserInputDelayThreshold) override; \
420
  NS_IMETHOD SetUserInputDelayThreshold(uint64_t aUserInputDelayThreshold) override; \
421
  NS_IMETHOD GetJankAlertBufferingDelay(uint32_t *aJankAlertBufferingDelay) override; \
422
  NS_IMETHOD SetJankAlertBufferingDelay(uint32_t aJankAlertBufferingDelay) override; \
423
  NS_IMETHOD GetObservableWindow(uint64_t windowId, nsIPerformanceObservable **_retval) override; 
424
425
/* Use this macro when declaring the members of this interface when the
426
   class doesn't implement the interface. This is useful for forwarding. */
427
#define NS_DECL_NON_VIRTUAL_NSIPERFORMANCESTATSSERVICE \
428
  nsresult GetIsMonitoringCPOW(JSContext* cx, bool *aIsMonitoringCPOW); \
429
  nsresult SetIsMonitoringCPOW(JSContext* cx, bool aIsMonitoringCPOW); \
430
  nsresult GetIsMonitoringJank(JSContext* cx, bool *aIsMonitoringJank); \
431
  nsresult SetIsMonitoringJank(JSContext* cx, bool aIsMonitoringJank); \
432
  nsresult GetIsMonitoringPerCompartment(JSContext* cx, bool *aIsMonitoringPerCompartment); \
433
  nsresult SetIsMonitoringPerCompartment(JSContext* cx, bool aIsMonitoringPerCompartment); \
434
  nsresult GetSnapshot(JSContext* cx, nsIPerformanceSnapshot **_retval); \
435
  nsresult GetJankAlertThreshold(uint64_t *aJankAlertThreshold); \
436
  nsresult SetJankAlertThreshold(uint64_t aJankAlertThreshold); \
437
  nsresult GetAnimationJankLevelThreshold(int16_t *aAnimationJankLevelThreshold); \
438
  nsresult SetAnimationJankLevelThreshold(int16_t aAnimationJankLevelThreshold); \
439
  nsresult GetUserInputDelayThreshold(uint64_t *aUserInputDelayThreshold); \
440
  nsresult SetUserInputDelayThreshold(uint64_t aUserInputDelayThreshold); \
441
  nsresult GetJankAlertBufferingDelay(uint32_t *aJankAlertBufferingDelay); \
442
  nsresult SetJankAlertBufferingDelay(uint32_t aJankAlertBufferingDelay); \
443
  nsresult GetObservableWindow(uint64_t windowId, nsIPerformanceObservable **_retval); 
444
445
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
446
#define NS_FORWARD_NSIPERFORMANCESTATSSERVICE(_to) \
447
  NS_IMETHOD GetIsMonitoringCPOW(JSContext* cx, bool *aIsMonitoringCPOW) override { return _to GetIsMonitoringCPOW(cx, aIsMonitoringCPOW); } \
448
  NS_IMETHOD SetIsMonitoringCPOW(JSContext* cx, bool aIsMonitoringCPOW) override { return _to SetIsMonitoringCPOW(cx, aIsMonitoringCPOW); } \
449
  NS_IMETHOD GetIsMonitoringJank(JSContext* cx, bool *aIsMonitoringJank) override { return _to GetIsMonitoringJank(cx, aIsMonitoringJank); } \
450
  NS_IMETHOD SetIsMonitoringJank(JSContext* cx, bool aIsMonitoringJank) override { return _to SetIsMonitoringJank(cx, aIsMonitoringJank); } \
451
  NS_IMETHOD GetIsMonitoringPerCompartment(JSContext* cx, bool *aIsMonitoringPerCompartment) override { return _to GetIsMonitoringPerCompartment(cx, aIsMonitoringPerCompartment); } \
452
  NS_IMETHOD SetIsMonitoringPerCompartment(JSContext* cx, bool aIsMonitoringPerCompartment) override { return _to SetIsMonitoringPerCompartment(cx, aIsMonitoringPerCompartment); } \
453
  NS_IMETHOD GetSnapshot(JSContext* cx, nsIPerformanceSnapshot **_retval) override { return _to GetSnapshot(cx, _retval); } \
454
  NS_IMETHOD GetJankAlertThreshold(uint64_t *aJankAlertThreshold) override { return _to GetJankAlertThreshold(aJankAlertThreshold); } \
455
  NS_IMETHOD SetJankAlertThreshold(uint64_t aJankAlertThreshold) override { return _to SetJankAlertThreshold(aJankAlertThreshold); } \
456
  NS_IMETHOD GetAnimationJankLevelThreshold(int16_t *aAnimationJankLevelThreshold) override { return _to GetAnimationJankLevelThreshold(aAnimationJankLevelThreshold); } \
457
  NS_IMETHOD SetAnimationJankLevelThreshold(int16_t aAnimationJankLevelThreshold) override { return _to SetAnimationJankLevelThreshold(aAnimationJankLevelThreshold); } \
458
  NS_IMETHOD GetUserInputDelayThreshold(uint64_t *aUserInputDelayThreshold) override { return _to GetUserInputDelayThreshold(aUserInputDelayThreshold); } \
459
  NS_IMETHOD SetUserInputDelayThreshold(uint64_t aUserInputDelayThreshold) override { return _to SetUserInputDelayThreshold(aUserInputDelayThreshold); } \
460
  NS_IMETHOD GetJankAlertBufferingDelay(uint32_t *aJankAlertBufferingDelay) override { return _to GetJankAlertBufferingDelay(aJankAlertBufferingDelay); } \
461
  NS_IMETHOD SetJankAlertBufferingDelay(uint32_t aJankAlertBufferingDelay) override { return _to SetJankAlertBufferingDelay(aJankAlertBufferingDelay); } \
462
  NS_IMETHOD GetObservableWindow(uint64_t windowId, nsIPerformanceObservable **_retval) override { return _to GetObservableWindow(windowId, _retval); } 
463
464
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
465
#define NS_FORWARD_SAFE_NSIPERFORMANCESTATSSERVICE(_to) \
466
  NS_IMETHOD GetIsMonitoringCPOW(JSContext* cx, bool *aIsMonitoringCPOW) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsMonitoringCPOW(cx, aIsMonitoringCPOW); } \
467
  NS_IMETHOD SetIsMonitoringCPOW(JSContext* cx, bool aIsMonitoringCPOW) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsMonitoringCPOW(cx, aIsMonitoringCPOW); } \
468
  NS_IMETHOD GetIsMonitoringJank(JSContext* cx, bool *aIsMonitoringJank) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsMonitoringJank(cx, aIsMonitoringJank); } \
469
  NS_IMETHOD SetIsMonitoringJank(JSContext* cx, bool aIsMonitoringJank) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsMonitoringJank(cx, aIsMonitoringJank); } \
470
  NS_IMETHOD GetIsMonitoringPerCompartment(JSContext* cx, bool *aIsMonitoringPerCompartment) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsMonitoringPerCompartment(cx, aIsMonitoringPerCompartment); } \
471
  NS_IMETHOD SetIsMonitoringPerCompartment(JSContext* cx, bool aIsMonitoringPerCompartment) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsMonitoringPerCompartment(cx, aIsMonitoringPerCompartment); } \
472
  NS_IMETHOD GetSnapshot(JSContext* cx, nsIPerformanceSnapshot **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSnapshot(cx, _retval); } \
473
  NS_IMETHOD GetJankAlertThreshold(uint64_t *aJankAlertThreshold) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJankAlertThreshold(aJankAlertThreshold); } \
474
  NS_IMETHOD SetJankAlertThreshold(uint64_t aJankAlertThreshold) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetJankAlertThreshold(aJankAlertThreshold); } \
475
  NS_IMETHOD GetAnimationJankLevelThreshold(int16_t *aAnimationJankLevelThreshold) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnimationJankLevelThreshold(aAnimationJankLevelThreshold); } \
476
  NS_IMETHOD SetAnimationJankLevelThreshold(int16_t aAnimationJankLevelThreshold) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAnimationJankLevelThreshold(aAnimationJankLevelThreshold); } \
477
  NS_IMETHOD GetUserInputDelayThreshold(uint64_t *aUserInputDelayThreshold) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserInputDelayThreshold(aUserInputDelayThreshold); } \
478
  NS_IMETHOD SetUserInputDelayThreshold(uint64_t aUserInputDelayThreshold) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUserInputDelayThreshold(aUserInputDelayThreshold); } \
479
  NS_IMETHOD GetJankAlertBufferingDelay(uint32_t *aJankAlertBufferingDelay) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJankAlertBufferingDelay(aJankAlertBufferingDelay); } \
480
  NS_IMETHOD SetJankAlertBufferingDelay(uint32_t aJankAlertBufferingDelay) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetJankAlertBufferingDelay(aJankAlertBufferingDelay); } \
481
  NS_IMETHOD GetObservableWindow(uint64_t windowId, nsIPerformanceObservable **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetObservableWindow(windowId, _retval); } 
482
483
#define NS_TOOLKIT_PERFORMANCESTATSSERVICE_CID {0xfd7435d4, 0x9ec4, 0x4699, \
484
      {0xad, 0xd4, 0x1b, 0xe8, 0x3d, 0xd6, 0x8e, 0xf3} }
485
#define NS_TOOLKIT_PERFORMANCESTATSSERVICE_CONTRACTID "@mozilla.org/toolkit/performance-stats-service;1"
486
487
#endif /* __gen_nsIPerformanceStats_h__ */