mozStorageStatementRow.h (1416B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ : 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 MOZSTORAGESTATEMENTROW_H 8 #define MOZSTORAGESTATEMENTROW_H 9 10 #include "nsPIDOMWindow.h" 11 #include "nsWrapperCache.h" 12 13 namespace mozilla { 14 class ErrorResult; 15 16 namespace storage { 17 18 class Statement; 19 20 class StatementRow final : public nsISupports, public nsWrapperCache { 21 public: 22 NS_DECL_CYCLE_COLLECTING_ISUPPORTS 23 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(StatementRow) 24 25 explicit StatementRow(nsPIDOMWindowInner* aWindow, Statement* aStatement); 26 27 void NamedGetter(JSContext* aCx, const nsAString& aName, bool& aFound, 28 JS::MutableHandle<JS::Value> aResult, 29 mozilla::ErrorResult& aRv); 30 void GetSupportedNames(nsTArray<nsString>& aNames); 31 32 JSObject* WrapObject(JSContext* aCx, 33 JS::Handle<JSObject*> aGivenProto) override; 34 35 nsPIDOMWindowInner* GetParentObject() const { return mWindow; } 36 37 private: 38 ~StatementRow() {} 39 40 nsCOMPtr<nsPIDOMWindowInner> mWindow; 41 Statement* mStatement; 42 43 friend class StatementRowHolder; 44 }; 45 46 } // namespace storage 47 } // namespace mozilla 48 49 #endif /* MOZSTORAGESTATEMENTROW_H */