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