1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef xpcom_base_MemoryReportingProcess_h
8 #define xpcom_base_MemoryReportingProcess_h
21 // Top-level process actors should implement this to integrate with
22 // nsMemoryReportManager.
23 class MemoryReportingProcess
{
25 NS_IMETHOD_(MozExternalRefCountType
) AddRef() = 0;
26 NS_IMETHOD_(MozExternalRefCountType
) Release() = 0;
28 virtual ~MemoryReportingProcess() = default;
30 // Return true if the process is still alive, false otherwise.
31 virtual bool IsAlive() const = 0;
33 // Initiate a memory report request, returning true if a report was
34 // successfully initiated and false otherwise.
35 virtual bool SendRequestMemoryReport(
36 const uint32_t& aGeneration
, const bool& aAnonymize
,
37 const bool& aMinimizeMemoryUsage
,
38 const Maybe
<mozilla::ipc::FileDescriptor
>& aDMDFile
) = 0;
40 virtual int32_t Pid() const = 0;
43 } // namespace mozilla
45 #endif // xpcom_base_MemoryReportingProcess_h