|
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 nsISizeOfEventTarget_h___ |
|
8 #define nsISizeOfEventTarget_h___ |
|
9 |
|
10 #include "mozilla/MemoryReporting.h" |
|
11 #include "nsISupports.h" |
|
12 |
|
13 #define NS_ISIZEOFEVENTTARGET_IID \ |
|
14 {0xa1e08cb9, 0x5455, 0x4593, \ |
|
15 { 0xb4, 0x1f, 0x38, 0x7a, 0x85, 0x44, 0xd0, 0xb5 }} |
|
16 |
|
17 /** |
|
18 * This class is much the same as nsISizeOf, but is specifically for measuring |
|
19 * the contents of nsGlobalWindow::mEventTargetObjects. |
|
20 * |
|
21 * We don't use nsISizeOf because if we did, any object belonging to |
|
22 * mEventTargetObjects that implements nsISizeOf would be measured, which we |
|
23 * may not want (perhaps because the object is also measured elsewhere). |
|
24 */ |
|
25 class nsISizeOfEventTarget : public nsISupports |
|
26 { |
|
27 public: |
|
28 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISIZEOFEVENTTARGET_IID) |
|
29 |
|
30 /** |
|
31 * Measures the size of the things pointed to by the object, plus the object |
|
32 * itself. |
|
33 */ |
|
34 virtual size_t |
|
35 SizeOfEventTargetIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0; |
|
36 }; |
|
37 |
|
38 NS_DEFINE_STATIC_IID_ACCESSOR(nsISizeOfEventTarget, NS_ISIZEOFEVENTTARGET_IID) |
|
39 |
|
40 #endif /* nsISizeOfEventTarget_h___ */ |