33 #include <sbIRemoteSecurityEvent.h>
35 #include <nsComponentManagerUtils.h>
36 #include <nsIDOMDocumentEvent.h>
37 #include <nsIProgrammingLanguage.h>
46 static PRLogModuleInfo* gRemoteEventLog = nsnull;
50 #define LOG(args) PR_LOG(gRemoteEventLog, PR_LOG_WARN, args)
66 "classinfo:classDescription",
67 "classinfo:contractID",
69 "classinfo:implementationLanguage",
98 sbRemoteSecurityEvent::sbRemoteSecurityEvent() :
101 MOZ_COUNT_CTOR(sbRemoteSecurityEvent);
103 if (!gRemoteEventLog) {
104 gRemoteEventLog = PR_NewLogModule(
"sbRemoteSecurityEvent");
106 LOG((
"sbRemoteMediaItemStatusEvent::sbRemoteMediaItemStatusEvent()"));
122 sbRemoteSecurityEvent::GetRemotePlayer(
sbIRemotePlayer * *aRemotePlayer)
124 return NS_ERROR_NOT_IMPLEMENTED;
135 const nsAString& aSecurityCategory,
136 const nsAString& aSecurityCategoryID,
137 PRBool aHasAccessToCategory )
139 NS_ENSURE_ARG_POINTER( aEvent );
140 NS_ENSURE_ARG_POINTER( aScopeURI );
147 NS_ENSURE_SUCCESS( rv, rv );
160 NS_IMETHODIMP sbRemoteSecurityEvent::GetSiteScope(nsIURI * *aSiteScope)
162 NS_ENSURE_ARG_POINTER(aSiteScope);
165 NS_ADDREF( *aSiteScope );
171 NS_IMETHODIMP sbRemoteSecurityEvent::GetCategory(nsAString & aCategory)
178 NS_IMETHODIMP sbRemoteSecurityEvent::GetCategoryID(nsAString & aCategoryID)
185 NS_IMETHODIMP sbRemoteSecurityEvent::GetHasAccess(PRBool *aHasAccess)
187 NS_ENSURE_ARG_POINTER(aHasAccess);
194 sbRemoteSecurityEvent::InitSecurityEvent(nsIDOMDocument *aDoc,
196 const nsAString & aCategory,
197 const nsAString & aCategoryID,
200 NS_ENSURE_ARG_POINTER(aSiteScope);
207 nsCOMPtr<nsIDOMDocumentEvent>
208 docEvent( do_QueryInterface( aDoc, &rv ) );
209 NS_ENSURE_SUCCESS( rv , rv );
212 nsCOMPtr<nsIDOMEvent>
event;
214 NS_ENSURE_STATE(event);
220 NS_ENSURE_SUCCESS( rv , rv );
223 nsCOMPtr<nsIDOMEventTarget>
225 NS_ENSURE_SUCCESS( rv, rv );
228 nsCOMPtr<nsIPrivateDOMEvent> privEvt( do_QueryInterface( event, &rv ) );
229 NS_ENSURE_SUCCESS( rv, rv );
230 privEvt->SetTrusted(PR_TRUE);
241 #define FORWARD_NSIPRIVATEDOMEVENT(_method, _type, _arg, _rettype, _default) \
242 NS_IMETHODIMP_(_rettype) sbRemoteSecurityEvent::_method( _type _arg ) \
245 nsCOMPtr<nsIPrivateDOMEvent> inner( do_QueryInterface(mEvent, &rv) ); \
246 NS_ENSURE_SUCCESS(rv, _default); \
247 return inner->_method( _arg ); \
#define SB_IMPL_SECURITYCHECKEDCOMP_INIT_NOPLAYER(_class)
NS_IMETHOD InitEvent(nsIDOMEvent *, nsIURI *, const nsAString &, const nsAString &, PRBool)
#define SB_EVENT_RAPI_PERMISSION_DENIED
This interface is a composition of many of our other interfaces with the goal of exposing a more web-...
NS_DECL_ISUPPORTS NS_DECL_NSICLASSINFO NS_DECL_SBISECURITYAGGREGATOR NS_DECL_SBIREMOTESECURITYEVENT virtual NS_DECL_SBIMUTABLEREMOTESECURITYEVENT nsresult Init()
nsCOMPtr< nsIDOMNSEvent > mNSEvent
NS_IMPL_ISUPPORTS8(sbRemoteSecurityEvent, nsIClassInfo, nsIDOMEvent, nsIDOMNSEvent, nsIPrivateDOMEvent, nsISecurityCheckedComponent, sbIRemoteSecurityEvent, sbIMutableRemoteSecurityEvent, sbISecurityAggregator) NS_IMPL_CI_INTERFACE_GETTER5(sbRemoteSecurityEvent
A marker interface for objects that aggregate the security mixin.
static const char * sPublicMethods[]
nsISecurityCheckedComponent
static const char * sPublicRProperties[]
#define SB_EVENT_RAPI_PERMISSION_CHANGED
#define SB_IMPL_CLASSINFO_INTERFACES_ONLY(_class)
An interface to maintain information about the last security event that occurred. ...
nsCOMPtr< nsIDOMEvent > mEvent
static const char * sPublicWProperties[]
#define FORWARD_NSIPRIVATEDOMEVENT(_method, _type, _arg, _rettype, _default)
nsCOMPtr< nsIURI > mScopeURI