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"
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
)
21 static ProfilerIOInterposeObserver
& GetInstance();
23 virtual void Observe(Observation
& aObservation
) override
;
26 ProfilerIOInterposeObserver() = default;
27 virtual ~ProfilerIOInterposeObserver() {}
30 } // namespace mozilla
32 #endif // PROFILERIOINTERPOSEOBSERVER_H