michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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_StyleSheetList_h michael@0: #define mozilla_dom_StyleSheetList_h michael@0: michael@0: #include "nsIDOMStyleSheetList.h" michael@0: #include "nsWrapperCache.h" michael@0: michael@0: class nsCSSStyleSheet; michael@0: class nsINode; michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: class StyleSheetList : public nsIDOMStyleSheetList michael@0: , public nsWrapperCache michael@0: { michael@0: public: michael@0: StyleSheetList() michael@0: { michael@0: SetIsDOMBinding(); michael@0: } michael@0: virtual ~StyleSheetList() {} michael@0: michael@0: NS_DECL_CYCLE_COLLECTING_ISUPPORTS michael@0: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList) michael@0: NS_DECL_NSIDOMSTYLESHEETLIST michael@0: michael@0: virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE MOZ_FINAL; michael@0: michael@0: virtual nsINode* GetParentObject() const = 0; michael@0: michael@0: virtual uint32_t Length() = 0; michael@0: virtual nsCSSStyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) = 0; michael@0: nsCSSStyleSheet* Item(uint32_t aIndex) michael@0: { michael@0: bool dummy = false; michael@0: return IndexedGetter(aIndex, dummy); michael@0: } michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_dom_StyleSheetList_h