dom/icc/src/IccManager.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef mozilla_dom_IccManager_h
     6 #define mozilla_dom_IccManager_h
     8 #include "mozilla/DOMEventTargetHelper.h"
     9 #include "nsCycleCollectionParticipant.h"
    10 #include "nsIIccProvider.h"
    11 #include "nsTArrayHelpers.h"
    13 namespace mozilla {
    14 namespace dom {
    16 class IccListener;
    18 class IccManager MOZ_FINAL : public DOMEventTargetHelper
    19 {
    20 public:
    21   NS_DECL_ISUPPORTS_INHERITED
    23   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
    25   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(IccManager, DOMEventTargetHelper)
    27   IccManager(nsPIDOMWindow* aWindow);
    28   ~IccManager();
    30   void
    31   Shutdown();
    33   nsresult
    34   NotifyIccAdd(const nsAString& aIccId);
    36   nsresult
    37   NotifyIccRemove(const nsAString& aIccId);
    39   IMPL_EVENT_HANDLER(iccdetected)
    40   IMPL_EVENT_HANDLER(iccundetected)
    42   void
    43   GetIccIds(nsTArray<nsString>& aIccIds);
    45   already_AddRefed<nsISupports>
    46   GetIccById(const nsAString& aIccId) const;
    48   nsPIDOMWindow*
    49   GetParentObject() const { return GetOwner(); }
    51   virtual JSObject*
    52   WrapObject(JSContext* aCx) MOZ_OVERRIDE;
    54 private:
    55   nsTArray<nsRefPtr<IccListener>> mIccListeners;
    56 };
    58 } // namespace dom
    59 } // namespace mozilla
    61 #endif // mozilla_dom_IccManager_h

mercurial