2013-11-13 12:51:23 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_network_MobileConnectionArray_h__
|
|
|
|
#define mozilla_dom_network_MobileConnectionArray_h__
|
|
|
|
|
2014-09-21 11:24:42 +04:00
|
|
|
#include "mozilla/dom/MobileConnection.h"
|
2013-11-13 12:51:23 +04:00
|
|
|
#include "nsWrapperCache.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class MobileConnectionArray final : public nsISupports
|
2015-03-27 21:52:19 +03:00
|
|
|
, public nsWrapperCache
|
2013-11-13 12:51:23 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileConnectionArray)
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
explicit MobileConnectionArray(nsPIDOMWindowInner* aWindow);
|
2013-11-13 12:51:23 +04:00
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
nsPIDOMWindowInner*
|
2013-11-13 12:51:23 +04:00
|
|
|
GetParentObject() const;
|
|
|
|
|
|
|
|
// WrapperCache
|
|
|
|
virtual JSObject*
|
2015-03-21 19:28:04 +03:00
|
|
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
2013-11-13 12:51:23 +04:00
|
|
|
|
|
|
|
// WebIDL
|
2014-05-05 10:36:20 +04:00
|
|
|
MobileConnection*
|
2014-01-14 10:17:35 +04:00
|
|
|
Item(uint32_t aIndex);
|
2013-11-13 12:51:23 +04:00
|
|
|
|
|
|
|
uint32_t
|
2014-09-21 11:24:43 +04:00
|
|
|
Length();
|
2013-11-13 12:51:23 +04:00
|
|
|
|
2014-05-05 10:36:20 +04:00
|
|
|
MobileConnection*
|
2014-01-14 10:17:35 +04:00
|
|
|
IndexedGetter(uint32_t aIndex, bool& aFound);
|
2013-11-13 12:51:23 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
~MobileConnectionArray();
|
|
|
|
|
2014-09-21 11:24:43 +04:00
|
|
|
bool mLengthInitialized;
|
2013-12-09 05:59:17 +04:00
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
nsCOMPtr<nsPIDOMWindowInner> mWindow;
|
2015-10-18 08:24:48 +03:00
|
|
|
nsTArray<RefPtr<MobileConnection>> mMobileConnections;
|
2013-11-13 12:51:23 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2013-12-09 05:59:17 +04:00
|
|
|
#endif // mozilla_dom_network_MobileConnectionArray_h__
|