2013-07-15 08:27:19 +00: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_telephony_CallsList_h__
|
|
|
|
#define mozilla_dom_telephony_CallsList_h__
|
|
|
|
|
2013-09-12 03:47:14 +00:00
|
|
|
#include "mozilla/dom/telephony/TelephonyCommon.h"
|
2013-07-15 08:27:19 +00:00
|
|
|
|
|
|
|
#include "nsWrapperCache.h"
|
|
|
|
|
2013-09-12 03:47:14 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
2013-07-15 08:27:19 +00:00
|
|
|
|
|
|
|
class CallsList MOZ_FINAL : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
nsRefPtr<Telephony> mTelephony;
|
2013-07-06 10:24:55 +00:00
|
|
|
nsRefPtr<TelephonyCallGroup> mGroup;
|
2013-07-15 08:27:19 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CallsList)
|
|
|
|
|
2014-09-01 22:26:43 +00:00
|
|
|
explicit CallsList(Telephony* aTelephony, TelephonyCallGroup* aGroup = nullptr);
|
2013-07-15 08:27:19 +00:00
|
|
|
|
|
|
|
nsPIDOMWindow*
|
|
|
|
GetParentObject() const;
|
|
|
|
|
|
|
|
// WrapperCache
|
|
|
|
virtual JSObject*
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 14:13:33 +00:00
|
|
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
|
2013-07-15 08:27:19 +00:00
|
|
|
|
|
|
|
// CallsList WebIDL
|
|
|
|
already_AddRefed<TelephonyCall>
|
|
|
|
Item(uint32_t aIndex) const;
|
|
|
|
|
|
|
|
uint32_t
|
|
|
|
Length() const;
|
|
|
|
|
|
|
|
already_AddRefed<TelephonyCall>
|
|
|
|
IndexedGetter(uint32_t aIndex, bool& aFound) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
~CallsList();
|
|
|
|
};
|
|
|
|
|
2013-09-12 03:47:14 +00:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2013-07-15 08:27:19 +00:00
|
|
|
|
|
|
|
#endif // mozilla_dom_telephony_CallsList_h__
|