Backed out changeset 4191b252db9b (bug 1886734) for causing build bustages @netwerk...
[gecko.git] / tools / profiler / gecko / ProfilerIOInterposeObserver.h
blob9e22a34f1580c8e2331080feae96728316ec01fc
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef PROFILERIOINTERPOSEOBSERVER_H
6 #define PROFILERIOINTERPOSEOBSERVER_H
8 #include "mozilla/IOInterposer.h"
9 #include "nsISupportsImpl.h"
11 namespace mozilla {
13 /**
14 * This class is the observer that calls into the profiler whenever
15 * main thread I/O occurs.
17 class ProfilerIOInterposeObserver final : public IOInterposeObserver {
18 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ProfilerIOInterposeObserver)
20 public:
21 static ProfilerIOInterposeObserver& GetInstance();
23 virtual void Observe(Observation& aObservation) override;
25 private:
26 ProfilerIOInterposeObserver() = default;
27 virtual ~ProfilerIOInterposeObserver() {}
30 } // namespace mozilla
32 #endif // PROFILERIOINTERPOSEOBSERVER_H