Bug 1946184 - Fix computing the CSD margin right after calling HideWindowChrome(...
[gecko.git] / toolkit / components / telemetry / core / ipc / TelemetryIPCAccumulator.h
blobe77ca953915db7fee6a800f3c22a839160596268
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef TelemetryIPCAccumulator_h__
7 #define TelemetryIPCAccumulator_h__
9 #include "mozilla/AlreadyAddRefed.h"
10 #include "mozilla/Maybe.h"
11 #include "nsStringFwd.h"
12 #include "mozilla/Telemetry.h" // for EventExtraEntry
13 #include "mozilla/TelemetryComms.h" // for ScalarActionType, Scala...
14 #include "mozilla/TelemetryHistogramEnums.h" // for HistogramID
16 class nsIRunnable;
17 class nsITimer;
19 namespace mozilla {
21 class TimeStamp;
23 namespace TelemetryIPCAccumulator {
25 // Histogram accumulation functions.
26 void AccumulateChildHistogram(mozilla::Telemetry::HistogramID aId,
27 uint32_t aSample);
28 void AccumulateChildKeyedHistogram(mozilla::Telemetry::HistogramID aId,
29 const nsCString& aKey, uint32_t aSample);
31 // Scalar accumulation functions.
32 void RecordChildScalarAction(uint32_t aId, bool aDynamic,
33 mozilla::Telemetry::ScalarActionType aAction,
34 const mozilla::Telemetry::ScalarVariant& aValue);
36 void RecordChildKeyedScalarAction(
37 uint32_t aId, bool aDynamic, const nsAString& aKey,
38 mozilla::Telemetry::ScalarActionType aAction,
39 const mozilla::Telemetry::ScalarVariant& aValue);
41 void RecordChildEvent(
42 const mozilla::TimeStamp& timestamp, const nsACString& category,
43 const nsACString& method, const nsACString& object,
44 const mozilla::Maybe<nsCString>& value,
45 const nsTArray<mozilla::Telemetry::EventExtraEntry>& extra);
47 void IPCTimerFired(nsITimer* aTimer, void* aClosure);
49 void DeInitializeGlobalState();
51 void DispatchToMainThread(already_AddRefed<nsIRunnable>&& aEvent);
53 } // namespace TelemetryIPCAccumulator
54 } // namespace mozilla
56 #endif // TelemetryIPCAccumulator_h__