michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=8 sts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_VideoPlaybackQuality_h_ michael@0: #define mozilla_dom_VideoPlaybackQuality_h_ michael@0: michael@0: #include "mozilla/dom/HTMLMediaElement.h" michael@0: #include "nsCycleCollectionParticipant.h" michael@0: #include "nsDOMNavigationTiming.h" michael@0: #include "nsWrapperCache.h" michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: class VideoPlaybackQuality MOZ_FINAL : public nsWrapperCache michael@0: { michael@0: public: michael@0: NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(VideoPlaybackQuality) michael@0: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(VideoPlaybackQuality) michael@0: michael@0: VideoPlaybackQuality(HTMLMediaElement* aElement, DOMHighResTimeStamp aCreationTime, michael@0: uint64_t aTotalFrames, uint64_t aDroppedFrames, michael@0: uint64_t aCorruptedFrames); michael@0: michael@0: HTMLMediaElement* GetParentObject() const; michael@0: michael@0: JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; michael@0: michael@0: DOMHighResTimeStamp CreationTime() const michael@0: { michael@0: return mCreationTime; michael@0: } michael@0: michael@0: uint64_t TotalVideoFrames() michael@0: { michael@0: return mTotalFrames; michael@0: } michael@0: michael@0: uint64_t DroppedVideoFrames() michael@0: { michael@0: return mDroppedFrames; michael@0: } michael@0: michael@0: uint64_t CorruptedVideoFrames() michael@0: { michael@0: return mCorruptedFrames; michael@0: } michael@0: michael@0: private: michael@0: nsRefPtr mElement; michael@0: DOMHighResTimeStamp mCreationTime; michael@0: uint64_t mTotalFrames; michael@0: uint64_t mDroppedFrames; michael@0: uint64_t mCorruptedFrames; michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: #endif /* mozilla_dom_VideoPlaybackQuality_h_ */