DDMediaLog.h (1277B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim:set ts=2 sw=2 sts=2 et cindent: */ 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 DDMediaLog_h_ 8 #define DDMediaLog_h_ 9 10 #include "DDLogMessage.h" 11 #include "nsTArray.h" 12 13 namespace mozilla { 14 15 namespace dom { 16 class HTMLMediaElement; 17 } // namespace dom 18 19 class DDLifetimes; 20 21 // Container of processed messages corresponding to an HTMLMediaElement (or 22 // not yet). 23 struct DDMediaLog { 24 // Associated HTMLMediaElement, or nullptr for the DDMediaLog containing 25 // messages for yet-unassociated objects. 26 // TODO: Should use a DDLogObject instead, to distinguish between elements 27 // at the same address. 28 // Not critical: At worst we will combine logs for two elements. 29 const dom::HTMLMediaElement* mMediaElement; 30 31 // Number of lifetimes associated with this log. Managed by DDMediaLogs. 32 int32_t mLifetimeCount = 0; 33 34 using LogMessages = nsTArray<DDLogMessage>; 35 LogMessages mMessages; 36 37 size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const; 38 }; 39 40 } // namespace mozilla 41 42 #endif // DDMediaLog_h_