Line data Source code
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/. */
6 :
7 : #ifndef xpcom_base_MemoryReportingProcess_h
8 : #define xpcom_base_MemoryReportingProcess_h
9 :
10 : #include <stdint.h>
11 : #include "nscore.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 : class MaybeFileDesc;
16 : } // namespace dom
17 :
18 : // Top-level process actors should implement this to integrate with
19 : // nsMemoryReportManager.
20 2 : class MemoryReportingProcess
21 : {
22 : public:
23 : NS_IMETHOD_(MozExternalRefCountType) AddRef() = 0;
24 : NS_IMETHOD_(MozExternalRefCountType) Release() = 0;
25 :
26 0 : virtual ~MemoryReportingProcess()
27 0 : {}
28 :
29 : // Return true if the process is still alive, false otherwise.
30 : virtual bool IsAlive() const = 0;
31 :
32 : // Initiate a memory report request, returning true if a report was
33 : // successfully initiated and false otherwise.
34 : virtual bool SendRequestMemoryReport(
35 : const uint32_t& aGeneration,
36 : const bool& aAnonymize,
37 : const bool& aMinimizeMemoryUsage,
38 : const dom::MaybeFileDesc& aDMDFile) = 0;
39 :
40 : virtual int32_t Pid() const = 0;
41 : };
42 :
43 : } // namespace mozilla
44 :
45 : #endif // xpcom_base_MemoryReportingProcess_h
|