2012-06-28 18:21:48 +04:00
|
|
|
/* 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/. */
|
|
|
|
|
2013-10-22 15:23:00 +04:00
|
|
|
#ifndef mozilla_dom_IccManager_h
|
|
|
|
#define mozilla_dom_IccManager_h
|
2012-06-28 18:21:48 +04:00
|
|
|
|
2014-04-01 10:13:50 +04:00
|
|
|
#include "mozilla/DOMEventTargetHelper.h"
|
2012-06-28 18:21:48 +04:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
2015-03-18 21:48:52 +03:00
|
|
|
#include "nsIIccProvider.h"
|
2013-10-09 13:40:12 +04:00
|
|
|
#include "nsTArrayHelpers.h"
|
2012-06-28 18:21:48 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2014-05-19 21:20:21 +04:00
|
|
|
class Icc;
|
2014-11-13 14:12:11 +03:00
|
|
|
class IccListener;
|
2013-03-06 13:53:27 +04:00
|
|
|
|
2014-04-01 10:13:50 +04:00
|
|
|
class IccManager MOZ_FINAL : public DOMEventTargetHelper
|
2013-10-09 13:40:12 +04:00
|
|
|
{
|
2012-06-28 18:21:48 +04:00
|
|
|
public:
|
2013-03-06 13:53:27 +04:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2012-06-28 18:21:48 +04:00
|
|
|
|
2014-04-01 10:13:50 +04:00
|
|
|
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
|
2012-06-28 18:21:48 +04:00
|
|
|
|
2014-04-16 11:30:28 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(IccManager, DOMEventTargetHelper)
|
2013-10-09 13:40:12 +04:00
|
|
|
|
2015-03-18 21:48:52 +03:00
|
|
|
IccManager(nsPIDOMWindow* aWindow);
|
2013-10-09 13:40:12 +04:00
|
|
|
|
|
|
|
void
|
|
|
|
Shutdown();
|
2012-06-28 18:21:48 +04:00
|
|
|
|
2013-10-09 13:40:12 +04:00
|
|
|
nsresult
|
|
|
|
NotifyIccAdd(const nsAString& aIccId);
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
NotifyIccRemove(const nsAString& aIccId);
|
2012-06-28 18:21:48 +04:00
|
|
|
|
2014-04-16 11:30:28 +04:00
|
|
|
IMPL_EVENT_HANDLER(iccdetected)
|
|
|
|
IMPL_EVENT_HANDLER(iccundetected)
|
|
|
|
|
|
|
|
void
|
|
|
|
GetIccIds(nsTArray<nsString>& aIccIds);
|
2013-10-09 13:40:12 +04:00
|
|
|
|
2014-05-19 21:20:21 +04:00
|
|
|
Icc*
|
2014-04-16 11:30:28 +04:00
|
|
|
GetIccById(const nsAString& aIccId) const;
|
2013-10-09 13:40:12 +04:00
|
|
|
|
2014-04-16 11:30:28 +04:00
|
|
|
nsPIDOMWindow*
|
|
|
|
GetParentObject() const { return GetOwner(); }
|
|
|
|
|
|
|
|
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 17:13:33 +03:00
|
|
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
|
2014-04-16 11:30:28 +04:00
|
|
|
|
2014-07-11 11:58:01 +04:00
|
|
|
private:
|
|
|
|
~IccManager();
|
|
|
|
|
2014-04-16 11:30:28 +04:00
|
|
|
private:
|
|
|
|
nsTArray<nsRefPtr<IccListener>> mIccListeners;
|
2012-06-28 18:21:48 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2013-10-22 15:23:00 +04:00
|
|
|
#endif // mozilla_dom_IccManager_h
|