2012-06-28 14:21:48 +00: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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_icc_IccManager_h
|
|
|
|
#define mozilla_dom_icc_IccManager_h
|
|
|
|
|
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "nsDOMEventTargetHelper.h"
|
|
|
|
#include "nsIDOMIccManager.h"
|
2013-03-06 09:53:27 +00:00
|
|
|
#include "nsIIccProvider.h"
|
2012-06-28 14:21:48 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
namespace icc {
|
|
|
|
|
|
|
|
class IccManager : public nsDOMEventTargetHelper
|
|
|
|
, public nsIDOMMozIccManager
|
|
|
|
{
|
2013-03-06 09:53:27 +00:00
|
|
|
/**
|
|
|
|
* Class IccManager doesn't actually inherit nsIIccListener. Instead, it owns
|
|
|
|
* an nsIIccListener derived instance mListener and passes it to
|
|
|
|
* nsIIccProvider. The onreceived events are first delivered to mListener and
|
|
|
|
* then forwarded to its owner, IccManager. See also bug 775997 comment #51.
|
|
|
|
*/
|
|
|
|
class Listener;
|
|
|
|
|
2012-06-28 14:21:48 +00:00
|
|
|
public:
|
2013-03-06 09:53:27 +00:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2012-06-28 14:21:48 +00:00
|
|
|
NS_DECL_NSIDOMMOZICCMANAGER
|
2013-03-06 09:53:27 +00:00
|
|
|
NS_DECL_NSIICCLISTENER
|
2012-06-28 14:21:48 +00:00
|
|
|
|
2013-04-16 21:16:08 +00:00
|
|
|
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
|
2012-06-28 14:21:48 +00:00
|
|
|
|
|
|
|
IccManager();
|
|
|
|
|
|
|
|
void Init(nsPIDOMWindow *aWindow);
|
|
|
|
void Shutdown();
|
|
|
|
|
|
|
|
private:
|
2013-03-06 09:53:27 +00:00
|
|
|
nsCOMPtr<nsIIccProvider> mProvider;
|
|
|
|
nsRefPtr<Listener> mListener;
|
2012-06-28 14:21:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace icc
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_icc_IccManager_h
|